diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2020-10-28 16:32:42 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2020-10-28 16:32:42 +0100 |
commit | 0f540cf2d320f7ea09048747d2b157060cfab0c2 (patch) | |
tree | 6edbc664629b203704b26593040482a37c8fe3b2 /docs | |
parent | 01a7c5d1b23fb16ed4578eb0eed3cb034829191d (diff) |
Additional example collection: bookmarks
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/bookmarks/README.rst | 9 | ||||
-rw-r--r-- | docs/examples/bookmarks/settings.yaml | 25 | ||||
-rw-r--r-- | docs/examples/bookmarks/templates/page.html | 23 |
3 files changed, 57 insertions, 0 deletions
diff --git a/docs/examples/bookmarks/README.rst b/docs/examples/bookmarks/README.rst new file mode 100644 index 0000000..6114225 --- /dev/null +++ b/docs/examples/bookmarks/README.rst @@ -0,0 +1,9 @@ +############## + My Bookmarks +############## + +This is an example collection of bookmarks. + +A page with all the bookmarks can be generated with the command:: + + lesana search --all --template templates/page.html '*' > my_bookmarks.html diff --git a/docs/examples/bookmarks/settings.yaml b/docs/examples/bookmarks/settings.yaml new file mode 100644 index 0000000..7d0d126 --- /dev/null +++ b/docs/examples/bookmarks/settings.yaml @@ -0,0 +1,25 @@ +name: My Bookmarks +lang: english +entry_label: '{{ short_id }}: {{ title }} {{ url }}' +git: true +fields: +- name: title + type: string + prefix: S + index: free +- name: url + type: url + index: field +- name: description + type: text + index: free +- name: tags + type: list + list: string + index: field +- name: added + type: datetime + index: field +- name: updated + type: datetime + index: field diff --git a/docs/examples/bookmarks/templates/page.html b/docs/examples/bookmarks/templates/page.html new file mode 100644 index 0000000..34aecca --- /dev/null +++ b/docs/examples/bookmarks/templates/page.html @@ -0,0 +1,23 @@ +<html> +<head> + <title>My Bookmarks</title> +</head> +<body> + <h1>My Bookmarks</h1> + +<dl> +{% for entry in entries %} + <dd><a href="{{ entry.data.url }}">{{ entry.data.title }}</a></dd> + <dl> + <div>{{ entry.data.description }}<div> + <div>{{ entry.data.added }}</div> + <ul> + {% for t in entry.data.tags %} + <li>{{ t }} + {% endfor %} + </ul> + </dl> +{% endfor %} +</dl> +</body> +</html> |