Compare commits
17 commits
Author | SHA1 | Date | |
---|---|---|---|
|
9185b10a81 | ||
|
d583017080 | ||
|
f6e05f4e65 | ||
|
cd671fc193 | ||
|
e2c7a20ae2 | ||
|
b72248919e | ||
|
3da2668a61 | ||
|
a9d9441c4a | ||
|
8c4c185ac5 | ||
|
e686fbc89b | ||
|
4565fba03e | ||
|
3cc3905552 | ||
|
3359f859f7 | ||
|
d4ff89ef02 | ||
|
33def459cc | ||
|
9f1cc6cace | ||
|
bb6b6e0022 |
26
README.md
26
README.md
|
@ -8,13 +8,14 @@
|
|||
- [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
|
||||
cd themes
|
||||
git clone https://github.com/getzola/after-dark.git
|
||||
```
|
||||
and then enable it in your `config.toml`:
|
||||
|
||||
|
@ -35,8 +36,8 @@ The theme requires tags and categories taxonomies to be enabled in your `config.
|
|||
```toml
|
||||
taxonomies = [
|
||||
# You can enable/disable RSS
|
||||
{name = "categories", rss = true},
|
||||
{name = "tags", rss = true},
|
||||
{name = "categories", feed = true},
|
||||
{name = "tags", feed = true},
|
||||
]
|
||||
```
|
||||
If you want to paginate taxonomies pages, you will need to overwrite the templates
|
||||
|
@ -65,6 +66,23 @@ The site title is shown on the homepage. As it might be different from the `<tit
|
|||
element that the `title` field in the config represents, you can set the `after_dark_title`
|
||||
instead.
|
||||
|
||||
### Author
|
||||
You can set this on a per page basis or in the config file.
|
||||
|
||||
`config.toml`:
|
||||
```toml
|
||||
[extra]
|
||||
author = "John Smith"
|
||||
```
|
||||
In a page (wrap this in +++):
|
||||
```toml
|
||||
title = "..."
|
||||
date = 1970-01-01
|
||||
|
||||
[extra]
|
||||
author = "John Smith"
|
||||
```
|
||||
|
||||
### KaTeX math formula support
|
||||
|
||||
This theme contains math formula support using [KaTeX](https://katex.org/),
|
||||
|
|
|
@ -5,8 +5,8 @@ description = ""
|
|||
generate_feed = true
|
||||
|
||||
taxonomies = [
|
||||
{name = "categories", rss = true},
|
||||
{name = "tags", rss = true},
|
||||
{name = "categories", feed = true},
|
||||
{name = "tags", feed = true},
|
||||
]
|
||||
|
||||
[extra]
|
||||
|
|
8
netlify.toml
Normal file
8
netlify.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[build]
|
||||
command = "zola build"
|
||||
|
||||
[build.environment]
|
||||
ZOLA_VERSION = "0.16.0"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "zola build --base-url $DEPLOY_PRIME_URL"
|
|
@ -19,6 +19,11 @@ h1, h2, h3, h4, h5, h6 {
|
|||
line-height: 1.3em
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
@ -298,7 +303,7 @@ a:hover {
|
|||
}
|
||||
|
||||
.hack pre code:after, .hack pre code:before {
|
||||
content: ''
|
||||
content: none
|
||||
}
|
||||
|
||||
.hack code {
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
<a itemprop="url"
|
||||
class="{% if item.url | replace(from="$BASE_URL", to=config.base_url) == current_url %}active{% endif %}"
|
||||
href="{{ item.url | safe | replace(from="$BASE_URL", to=config.base_url) }}">
|
||||
<span itemprop="name">{{ item.name }}
|
||||
</span></a>
|
||||
<span itemprop="name">{{ item.name }}</span></a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</header>
|
||||
|
@ -62,6 +61,11 @@
|
|||
<h1>{{ config.extra.after_dark_title }}</h1>
|
||||
</header>
|
||||
{% endif %}
|
||||
{% if section.content %}
|
||||
<div>
|
||||
{{ section.content | safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for page in paginator.pages %}
|
||||
{{ post_macros::page_in_list(page=page) }}
|
||||
{% endfor %}
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
<footer>
|
||||
<hr>
|
||||
<p>
|
||||
{% if config.extra.author %}
|
||||
{% if page.extra.author %}
|
||||
Published by {{ page.extra.author }}
|
||||
{% elif config.extra.author %}
|
||||
Published by {{ config.extra.author }}
|
||||
{% endif %}
|
||||
{% if page.taxonomies.categories %}
|
||||
|
@ -27,7 +29,8 @@
|
|||
in <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">{{ category }}</a>
|
||||
{% endif %}
|
||||
{% if page.taxonomies.tags %}
|
||||
and tagged
|
||||
{% if page.taxonomies.categories %}and{% endif %}
|
||||
tagged
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a>
|
||||
{% if page.taxonomies.tags | length > 1 %}
|
||||
|
@ -49,4 +52,3 @@
|
|||
</article>
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
|
|
|
@ -28,6 +28,12 @@
|
|||
{{ page.summary | safe }}
|
||||
<nav class="readmore"><a itemprop="url" href="{{ page.permalink | safe }}">Read More »</a></nav>
|
||||
</div>
|
||||
{% else %}
|
||||
<div itemprop="summary">
|
||||
{{ page.content | striptags | truncate | safe }}
|
||||
<nav class="readmore"><a itemprop="url" href="{{ page.permalink | safe }}">Read More »</a></nav>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</article>
|
||||
{% endmacro page_in_list %}
|
||||
|
|
Loading…
Reference in a new issue