diff --git a/README.md b/README.md index 59efedb..a22c531 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ An insanely fast and performance-based Zola theme, ported from [Light Speed Jeky Some fun facts about the theme: * Perfect score on Google's Lighthouse audit -* Only ~434 bytes of CSS -* No media queries +* Only ~600 bytes of CSS * No JavaScript Demo: [quirky-perlman-34d0da.netlify.com](https://quirky-perlman-34d0da.netlify.com) @@ -19,8 +18,8 @@ Demo: [quirky-perlman-34d0da.netlify.com](https://quirky-perlman-34d0da.netlify. - [Options](#options) - [Title](#title) - [Sass](#Sass) - - [RSS](#RSS) - [Footer menu](#footer-menu) + - [Netlify](#netlify) - [Original](#original) - [License](#license) @@ -37,12 +36,12 @@ and then enable it in your `config.toml`: theme = "lightspeed" ``` -Posts should be placed in the `blog` folder. +Posts should be placed directly in the `content` folder. ## Options ### Title -Set a tile and description for your site to appear in the header: +Set a title and description in the config to appear in the site header: ```toml title = "Different strokes" @@ -52,7 +51,7 @@ description = "for different folks" ### Sass -The theme's css is compiled from sass and the output is imported inline to the header :zap: +Styles are compiled from sass and imported inline to the header :zap: You can overide the styles by enabling sass compilation in the config: @@ -60,23 +59,7 @@ You can overide the styles by enabling sass compilation in the config: compile_sass = true ``` -...and placing a replacement `style.scss` file in the sass folder. - -### RSS -Enable rss with the standard zola option: - -```toml -generate_rss = true -``` - -...and include your name and email in the feed by setting fields in `extra` with keys `author` and `email`: - -```toml -[extra] - -author = "Grant Green" -email = "grant@green.org" -``` +...and placing a replacement `style.scss` file in your sass folder. ### Footer-menu Set a field in `extra` with a key of `footer_links`: @@ -94,6 +77,22 @@ footer_links = [ If you put `$BASE_URL` in a url, it will automatically be replaced by the actual site URL. +Create pages such as `$BASE_URL/about` by placing them in a subfolder of the content directory, and specifying the path in the frontmatter: + +```toml +path = "about" +``` + +### Netlify + +Deployed on netlify? Let people know in the footer by setting `netlify` in `extra` as `true`. + +```toml +[extra] + +netlify = true +``` + ## Original This template is based on the Jekyll template [Light Speed Jekyll](https://github.com/bradleytaunt/lightspeed) by **Bradley Taunt**: diff --git a/config.toml b/config.toml index 6edc9e3..3566a15 100644 --- a/config.toml +++ b/config.toml @@ -1,16 +1,16 @@ base_url = "https://quirky-perlman-34d0da.netlify.com" title = "Light Speed" description = "Zola theme with a perfect Lighthouse score" + compile_sass = true generate_rss = true highlight_code = true highlight_theme = "gruvbox-light" - [extra] -author = "Grant" -email = "Green" + +netlify = true footer_links = [ {url = "$BASE_URL/about", name = "About"}, diff --git a/content/blog/2019-02-18-hello-world.md b/content/2019-02-18-hello-world.md similarity index 100% rename from content/blog/2019-02-18-hello-world.md rename to content/2019-02-18-hello-world.md diff --git a/content/blog/2019-03-25-code-snippets.md b/content/2019-03-25-code-snippets.md similarity index 100% rename from content/blog/2019-03-25-code-snippets.md rename to content/2019-03-25-code-snippets.md diff --git a/content/blog/2019-03-29-example-of-all-elements.md b/content/2019-03-29-example-of-all-elements.md similarity index 100% rename from content/blog/2019-03-29-example-of-all-elements.md rename to content/2019-03-29-example-of-all-elements.md diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..8bc0069 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +sort_by = "date" ++++ diff --git a/content/blog/_index.md b/content/pages/_index.md similarity index 100% rename from content/blog/_index.md rename to content/pages/_index.md diff --git a/content/about.md b/content/pages/about.md similarity index 85% rename from content/about.md rename to content/pages/about.md index 7b3a13d..10319ad 100755 --- a/content/about.md +++ b/content/pages/about.md @@ -1,15 +1,14 @@ +++ title = "About This Theme" -template = "about.html" +path = "about" +++ Some fun facts about the theme include: * Perfect score on Google's Lighthouse audit -* Only ~434 bytes of CSS -* No media queries +* Only ~600 bytes of CSS * No JavaScript -* Probably the fastest Jekyll theme on the Internet 1 +* Probably the fastest Zola theme on the Internet 1 ## Who Made This diff --git a/templates/about.html b/templates/about.html deleted file mode 100755 index aaba962..0000000 --- a/templates/about.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "index.html" %} - -{% block title %}{{ page.title }} · {{ config.title }}{% endblock title %} -{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} - -{% block content %} -
-

{{ page.title }}

- {{ page.content | safe }} -
-{% endblock content %} diff --git a/templates/index.html b/templates/index.html index d5b1123..39befe0 100755 --- a/templates/index.html +++ b/templates/index.html @@ -9,7 +9,8 @@ {% block title %}{{ config.title }} · {{ config.description }}{% endblock title %} - + + @@ -34,9 +35,8 @@ {% block content %} {% endblock content %} @@ -53,8 +53,9 @@ {% endfor %} - Built with Zola & hosted on - Netlify.
+ Built with Zola + {% if config.extra.netlify %} & hosted on Netlify{% endif %} + .
Maintained with ♥ for the web.
diff --git a/templates/macros.html b/templates/macros.html index e56894b..0bd7a5e 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -1,11 +1,7 @@ {% macro post_in_list(post) %} -
  • - {{ post.title }} - -
  • +
  • + {{ post.title }} + +
  • {% endmacro post_in_list %} diff --git a/templates/page.html b/templates/page.html index d8a9e92..08cd4e7 100755 --- a/templates/page.html +++ b/templates/page.html @@ -4,8 +4,13 @@ {% block description %}{{ page.description | default(value=config.description) }}{% endblock description %} {% block content %} -

    {{ page.title }}

    -

    Posted on

    +
    +

    {{ page.title }}

    -{{ page.content | safe }} + {% if page.date %} +

    Posted on

    + {% endif %} + + {{ page.content | safe }} +
    {% endblock content %} diff --git a/templates/rss.xml b/templates/rss.xml deleted file mode 100644 index e931912..0000000 --- a/templates/rss.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - {{ config.title }} - {{ config.base_url | escape_xml | safe }} - {{ config.description }} - Zola - {{ config.default_language }} - - {{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }} - - {{ config.extra.author }} - {{ config.extra.email }} - - {% set blog = get_section(path="blog/_index.md") %} - {% for page in blog.pages | reverse %} - - {{ page.title }} - {{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }} - {{ page.permalink | escape_xml | safe }} - {{ page.permalink | escape_xml | safe }} - {% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %} - - {% endfor %} - - diff --git a/theme.toml b/theme.toml index 6226644..1f1167a 100644 --- a/theme.toml +++ b/theme.toml @@ -14,11 +14,3 @@ author = "Bradley Taunt" homepage = "https://github.com/bradleytaunt" repo = "https://github.com/bradleytaunt/lightspeed" -[extra] -author = "" -email = "" - -footer_links = [ - {url = "$BASE_URL/about", name = "About"}, -] -