diff options
Diffstat (limited to 'docs/examples/bookmarks')
-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> |