whitespace, and author name meta-data

This commit is contained in:
carpetscheme 2020-04-18 16:49:03 +02:00
parent 376c660a8e
commit dae632b293
3 changed files with 16 additions and 5 deletions

View file

@ -19,6 +19,7 @@ Demo: [quirky-perlman-34d0da.netlify.com](https://quirky-perlman-34d0da.netlify.
- [Title](#title) - [Title](#title)
- [Sass](#Sass) - [Sass](#Sass)
- [Footer menu](#footer-menu) - [Footer menu](#footer-menu)
- [Author](#author)
- [Netlify](#netlify) - [Netlify](#netlify)
- [Original](#original) - [Original](#original)
- [License](#license) - [License](#license)
@ -83,9 +84,19 @@ Create pages such as `$BASE_URL/about` by placing them in a subfolder of the con
path = "about" path = "about"
``` ```
### Author
To add author name to the head meta-data, set an `author` field in `extra`:
```toml
[extra]
author = "Grant Green"
```
### Netlify ### Netlify
Deployed on netlify? Let people know in the footer by setting `netlify` in `extra` as `true`. Deployed on netlify? Add a link in the footer by setting `netlify` in `extra` as `true`.
```toml ```toml
[extra] [extra]

View file

@ -10,6 +10,7 @@ highlight_theme = "gruvbox-light"
[extra] [extra]
author = "El Carpet"
netlify = true netlify = true
footer_links = [ footer_links = [

View file

@ -9,12 +9,11 @@
<title>{% block title %}{{ config.title }} &middot; {{ config.description }}{% endblock title %}</title> <title>{% block title %}{{ config.title }} &middot; {{ config.description }}{% endblock title %}</title>
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}" /> <meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}" />
<!-- todo author name --> {% if config.extra.author %}<meta name="author" content="{{ config.extra.author }}" />{% endif %}
<meta name="author" content="">
<link rel="shortcut icon" href="{{ get_url(path="favicon.ico") | safe }}" /> <link rel="shortcut icon" href="{{ get_url(path="favicon.ico") | safe }}" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}"> <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}">
{% set data = load_data(path="public/style.css", format="plain") %} {% set data = load_data(path="public/style.css", format="plain") -%}
<style>{{ data | safe }}</style> <style>{{ data | safe }}</style>
</head> </head>
@ -54,7 +53,7 @@
</nav> </nav>
<small> <small>
Built with <a href="https://www.getzola.org/">Zola</a> Built with <a href="https://www.getzola.org/">Zola</a>
{% if config.extra.netlify %} & hosted on <a href="https://netlify.com">Netlify</a>{% endif %} {%- if config.extra.netlify %} & hosted on <a href="https://netlify.com">Netlify</a>{% endif -%}
.<br /> .<br />
Maintained with &hearts; for the web. Maintained with &hearts; for the web.
</small> </small>