From aff5e729fa98f5d70f89849b77cd5269b13bcb6c Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Mon, 20 Nov 2023 18:32:32 +0200 Subject: [PATCH] feat: content structure defined, config changes --- README.md | 3 +++ config.toml | 37 +++++++++++++++++++++++++++++------ content/_index.md | 5 +++++ content/one/2023-11-20-001.md | 9 +++++++++ content/one/_index.md | 8 ++++++++ content/two/_index.md | 8 ++++++++ templates/index.html | 6 ++++++ templates/log.html | 5 +++++ templates/project.html | 13 ++++++++++++ 9 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 content/_index.md create mode 100644 content/one/2023-11-20-001.md create mode 100644 content/one/_index.md create mode 100644 content/two/_index.md create mode 100644 templates/log.html create mode 100644 templates/project.html diff --git a/README.md b/README.md index d2841ff..628a91f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # liljamo.dev +## Notes +* Projects are sorted by their `weight`, defined in the section `_index.md` files. + ## License The content of this project is licensed under the [Creative Commons Attribution-NoDerivs 4.0 International license](https://creativecommons.org/licenses/by-nd/4.0/), and the underlying source code used to format and display that content is licensed under the [AGPL 3.0 license](LICENSE.md). diff --git a/config.toml b/config.toml index 255416c..0d021cd 100644 --- a/config.toml +++ b/config.toml @@ -1,16 +1,41 @@ -# The URL the site will be built for base_url = "https://liljamo.dev" -# Whether to automatically compile all Sass files in the sass directory -compile_sass = false +title = "liljamo projects" +description = "showcase and devlog site for personal projects" + +# default author +author = "Jonni Liljamo " + +default_language = "en" +# theme = "" # none -# Whether to build a search index to be used later on by a JavaScript library +output_dir = "public" +preserve_dotfiles_in_output = false +compile_sass = false +minify_html = false build_search_index = false +ignored_content = [] + +generate_feed = true +feed_filename = "atom.xml" +# feed_limit = 20 # unlimited when not set + +taxonomies = [] + [markdown] -# Whether to do syntax highlighting -# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola highlight_code = true +extra_syntaxes_and_themes = [] +highlight_theme = "ayu-light" + +render_emoji = false + +external_links_target_blank = false +external_links_no_follow = false +external_links_no_referrer = false + +# might be bad, feel free to change if it ain't maketh shit dope +smart_punctuation = true [extra] # Put all your custom variables here diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..82cd1a3 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "Index" +sort_by = "date" +template = "index.html" ++++ diff --git a/content/one/2023-11-20-001.md b/content/one/2023-11-20-001.md new file mode 100644 index 0000000..a26efd6 --- /dev/null +++ b/content/one/2023-11-20-001.md @@ -0,0 +1,9 @@ ++++ +slug = "001" +title = "log 1: I did a thing" + +# 'page.date' is in filename +updated = "2023-11-20" ++++ + +This is log content. diff --git a/content/one/_index.md b/content/one/_index.md new file mode 100644 index 0000000..5be94ef --- /dev/null +++ b/content/one/_index.md @@ -0,0 +1,8 @@ ++++ +weight = 10 + +title = "Test One" +sort_by = "date" +template = "project.html" +page_template = "log.html" ++++ diff --git a/content/two/_index.md b/content/two/_index.md new file mode 100644 index 0000000..f41eb13 --- /dev/null +++ b/content/two/_index.md @@ -0,0 +1,8 @@ ++++ +weight = 20 + +title = "Test Two" +sort_by = "date" +template = "project.html" +page_template = "log.html" ++++ diff --git a/templates/index.html b/templates/index.html index 7110515..0b7a0de 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,4 +2,10 @@ {% block content %}

balls

+ +{% for section_path in section.subsections %} +{% set section = get_section(path=section_path) %} +{{ section.title }} +{% endfor %} + {% endblock content %} diff --git a/templates/log.html b/templates/log.html new file mode 100644 index 0000000..8dfb501 --- /dev/null +++ b/templates/log.html @@ -0,0 +1,5 @@ +{% extends "layouts/base.html" %} + +{% block content %} +

{{ page.title }}

+{% endblock content %} diff --git a/templates/project.html b/templates/project.html new file mode 100644 index 0000000..532f4ee --- /dev/null +++ b/templates/project.html @@ -0,0 +1,13 @@ +{% extends "layouts/base.html" %} + +{% block content %} +

{{ section.title }}

+ +{% if section.pages %} +

has logs

+{% for page in section.pages %} +{{ page.title }} +{% endfor %} +{% endif %} + +{% endblock content %} -- 2.44.1