From 0f540cf2d320f7ea09048747d2b157060cfab0c2 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Wed, 28 Oct 2020 16:32:42 +0100 Subject: Additional example collection: bookmarks --- docs/examples/bookmarks/README.rst | 9 +++++++++ docs/examples/bookmarks/settings.yaml | 25 +++++++++++++++++++++++++ docs/examples/bookmarks/templates/page.html | 23 +++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 docs/examples/bookmarks/README.rst create mode 100644 docs/examples/bookmarks/settings.yaml create mode 100644 docs/examples/bookmarks/templates/page.html (limited to 'docs') 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 @@ + + + My Bookmarks + + +

My Bookmarks

+ +
+{% for entry in entries %} +
{{ entry.data.title }}
+
+
{{ entry.data.description }}
+
{{ entry.data.added }}
+
    + {% for t in entry.data.tags %} +
  • {{ t }} + {% endfor %} +
+
+{% endfor %} +
+ + -- cgit v1.2.3