diff --git a/README.md b/README.md index a945b12..2b1b423 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Some fun facts about the theme: * Perfect score on Google's Lighthouse audit * Only ~600 bytes of CSS * No JavaScript +* Now with SEO! Demo: [quirky-perlman-34d0da.netlify.com](https://quirky-perlman-34d0da.netlify.com) @@ -56,18 +57,6 @@ description = "for different folks" ``` -### Sass - -Styles are compiled from sass and imported inline to the header :zap: - -You can overide the styles by enabling sass compilation in the config: - -```toml -compile_sass = true -``` - -...and placing a replacement `style.scss` file in your sass folder. - ### Footer-menu Set a field in `extra` with a key of `footer_links`: @@ -76,7 +65,7 @@ Set a field in `extra` with a key of `footer_links`: footer_links = [ {url = "$BASE_URL/about", name = "About"}, - {url = "$BASE_URL/rss.xml", name = "RSS"}, + {url = "$BASE_URL/atom.xml", name = "RSS"}, {url = "https://google.com", name = "Google"}, ] ``` @@ -90,16 +79,31 @@ Create pages such as `$BASE_URL/about` by placing them in a subfolder of the con path = "about" ``` -### Author +### SEO -To add author name to the head meta-data, set an `author` field in `extra`: +SEO header tags are enabled by default. Most fields are picked up from the page data, but you can set the `author` and for the `og:image` tag provide the path to an image. ```toml [extra] author = "Grant Green" +ogimage = "Greenery.png" ``` +To disable SEO set field `seo` in `extra` to `false`. + +### Sass + +Styles are compiled from sass and imported inline to the header :zap: + +You can overide the styles by enabling sass compilation in the config: + +```toml +compile_sass = true +``` + +...and placing a replacement `style.scss` file in your sass folder. + ### Netlify Deployed on netlify? Add a link in the footer by setting `netlify` in `extra` as `true`. @@ -111,11 +115,7 @@ netlify = true ``` ## Original -This template is based on the Jekyll template [Light Speed Jekyll](https://github.com/bradleytaunt/lightspeed) by **Bradley Taunt**: - -- -- - +This template is based on the Jekyll template [Light Speed Jekyll](https://github.com/bradleytaunt/lightspeed) by Bradley Taunt. ## License diff --git a/config.toml b/config.toml index d9ca484..57bfc6c 100644 --- a/config.toml +++ b/config.toml @@ -10,7 +10,10 @@ highlight_theme = "gruvbox-light" [extra] +seo = true author = "El Carpet" +ogimage = "lightning.png" + netlify = true footer_links = [ diff --git a/content/2019-03-29-example-of-all-elements.md b/content/2019-03-29-example-of-all-elements.md index 28669ec..8627b3a 100644 --- a/content/2019-03-29-example-of-all-elements.md +++ b/content/2019-03-29-example-of-all-elements.md @@ -1,6 +1,8 @@ +++ title = "Example of elements" description = "Post showcasing elements" +[extra] +image = "favicon.ico" +++ # h1 Heading diff --git a/static/lightning.png b/static/lightning.png new file mode 100644 index 0000000..e303139 Binary files /dev/null and b/static/lightning.png differ diff --git a/templates/index.html b/templates/index.html index a4eb93a..d579519 100755 --- a/templates/index.html +++ b/templates/index.html @@ -9,13 +9,39 @@ {% block title %}{{ config.title }} · {{ config.description }}{% endblock title %} - {% if config.extra.author %}{% endif %} {% set data = load_data(path="public/style.css", format="plain") -%} + {% block seo -%} + {%- if config.extra.seo -%} + + + {% if config.extra.author -%} + + {%- endif %} + + + + + + {% if page.date -%} + + + {%- endif %} + + {% if page.earlier -%} + + {%- endif %} + {% if page.later -%} + + {%- endif %} + + {%- endif -%} + {%- endblock seo -%} + {% block extra_head %} {% endblock extra_head %} @@ -49,7 +75,7 @@ {% if config.extra.footer_links %}