summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreatradish <[email protected]>2022-04-09 20:06:40 +0800
committereatradish <[email protected]>2022-04-09 20:06:40 +0800
commit63d6999e1e4cc6bf521ed7bd98ab643c085131e9 (patch)
tree2b1dfa83e49dbd91610f5a611de793a41236e389
parent4a46a3849cdd90478adbcc7a0779da085f9e3a3f (diff)
downloadSeje2-63d6999e1e4cc6bf521ed7bd98ab643c085131e9.tar.gz
Seje2-63d6999e1e4cc6bf521ed7bd98ab643c085131e9.tar.bz2
Seje2-63d6999e1e4cc6bf521ed7bd98ab643c085131e9.zip
templates/page: update translate
- Also update README
-rw-r--r--README.md64
-rw-r--r--templates/page.html4
2 files changed, 64 insertions, 4 deletions
diff --git a/README.md b/README.md
index b51cf8e..524a0ba 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,62 @@
-# Sej2-preview
-Seje2 Preview
+# Seje2
+
+
+## Contents
+
+- [Installation](#installation)
+- [Options](#options)
+ - [Top menu](#top-menu)
+ - [Title](#title)
+ - [Author](#author)
+
+## Installation
+First download this theme to your `themes` directory:
+
+```bash
+cd themes
+git clone https://github.com/getzola/after-dark.git
+```
+and then enable it in your `config.toml`:
+
+```toml
+theme = "Seje2"
+```
+
+This theme requires your index section (`content/_index.md`) to be paginated to work:
+
+```toml
+paginate_by = 5
+```
+
+The posts should therefore be in directly under the `content` folder.
+
+## Options
+
+### Top-menu
+Set a field in `extra` with a key of `seje2_menu_links`:
+
+```toml
+seje2_menu_links = [
+ {url = "$BASE_URL", name = "Home"},
+ {url = "$BASE_URL/categories", name = "Categories"},
+ {url = "$BASE_URL/tags", name = "Tags"},
+ {url = "https://google.com", name = "Google"},
+]
+```
+
+If you put `$BASE_URL` in a url, it will automatically be replaced by the actual
+site URL.
+
+### Author
+You can set this on a per page basis or in the config file.
+
+```
+In a page (wrap this in +++):
+```toml
+title = "..."
+date = 1970-01-01
+
+[extra]
+author = "John Smith"
+```
+
diff --git a/templates/page.html b/templates/page.html
index 48a1c74..071b0a9 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -25,12 +25,12 @@
<nav id="prev_next">
<div class="prev">
{% if page.later %}
- <p>Newer</p><a href="{{ page.later.permalink }}"><div class="article-nav-title">{{ page.later.title }}</div></a>
+ <p>{{ trans(key="newer") }}<</p><a href="{{ page.later.permalink }}"><div class="article-nav-title">{{ page.later.title }}</div></a>
{% endif %}
</div>
<div class="next">
{% if page.earlier %}
- <p>Older</p><a href="{{ page.earlier.permalink }}"><div class="article-nav-title">{{ page.earlier.title }}</div></a>
+ <p>{{ trans(key="older") }}</p><a href="{{ page.earlier.permalink }}"><div class="article-nav-title">{{ page.earlier.title }}</div></a>
{% endif %}
</div>
</nav>