summaryrefslogtreecommitdiff
path: root/docs/examples/bookmarks
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2020-10-28 16:32:42 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2020-10-28 16:32:42 +0100
commit0f540cf2d320f7ea09048747d2b157060cfab0c2 (patch)
tree6edbc664629b203704b26593040482a37c8fe3b2 /docs/examples/bookmarks
parent01a7c5d1b23fb16ed4578eb0eed3cb034829191d (diff)
Additional example collection: bookmarks
Diffstat (limited to 'docs/examples/bookmarks')
-rw-r--r--docs/examples/bookmarks/README.rst9
-rw-r--r--docs/examples/bookmarks/settings.yaml25
-rw-r--r--docs/examples/bookmarks/templates/page.html23
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>