diff --git a/config.toml b/config.toml index cec1cb8..cb1a70e 100644 --- a/config.toml +++ b/config.toml @@ -141,8 +141,8 @@ show_repo = true links = [ { url = "@/blog/_index.md", name = "Blog" }, { url = "@/subprojects/_index.md", name = "Subprojects" }, + { url = "@/docs/_index.md", name = "Docs" }, { url = "@/demo/index.md", name = "Demo" }, - { url = "https://mastodon.de/@david_swift", name = "Developer" } ] [extra.footer] diff --git a/content/docs/_index.md b/content/docs/_index.md new file mode 100644 index 0000000..1229271 --- /dev/null +++ b/content/docs/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Docs" +sort_by = "weight" +template = "docs.html" +page_template = "documentation_page.html" ++++ diff --git a/content/docs/overview/index.md b/content/docs/overview/index.md new file mode 100644 index 0000000..f9bf481 --- /dev/null +++ b/content/docs/overview/index.md @@ -0,0 +1,6 @@ ++++ +weight = 1 +title = "Overview" ++++ + +This is overview's content! diff --git a/content/docs/page2/index.md b/content/docs/page2/index.md new file mode 100644 index 0000000..3d67baf --- /dev/null +++ b/content/docs/page2/index.md @@ -0,0 +1,6 @@ ++++ +weight = 1 +title = "Page 2" ++++ + +Another page diff --git a/templates/docs.html b/templates/docs.html new file mode 100644 index 0000000..af48475 --- /dev/null +++ b/templates/docs.html @@ -0,0 +1,46 @@ +{% extends "base.html" %} + +{% block content %} + +

{{ section.title }}

+ +{{ section.content | safe }} + +{#
+ {%- if paginator.pages -%} + {%- set pages = paginator.pages -%} + {%- elif section.pages -%} + {%- set pages = section.pages -%} + {%- else -%} + {%- set pages = term.pages -%} + {%- endif -%} + + {%- for month, pages in pages | group_by(attribute="month") -%} + {%- set posts_per_bar = pages | length -%} + {%- set bar_height = pages | length * 10 -%} +
+ {%- endfor -%} +
#} + +{% include "partials/subprojects.html" %} + +{%- if paginator.pages -%} + +{%- endif -%} +{% endblock content %} diff --git a/templates/documentation_page.html b/templates/documentation_page.html new file mode 100644 index 0000000..0979621 --- /dev/null +++ b/templates/documentation_page.html @@ -0,0 +1,122 @@ +{% extends "base.html" %} + +{% block content %} +{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%} + +{%- if page.extra.toc_ordered or section.extra.toc_ordered or config.extra.toc_ordered -%} + {%- set list_element = "ol" -%} +{%- else -%} + {%- set list_element = "ul" -%} +{%- endif -%} + +
+ {%- if page.extra.banner -%} + + {%- endif -%} + +
+ +

{{ page.title }}

+ + {%- if page.authors or config.extra.show_reading_time -%} +

+ + {%- if page.authors -%} + {% include "partials/authors.html" -%} + {%- if config.extra.show_reading_time -%} + {{ config.extra.separator | default(value="•") }} + {%- endif -%} + {%- endif -%} + + {%- if config.extra.show_reading_time -%} + {{ macros_translate::translate(key="minutes_read", number=page.reading_time, default="$NUMBER minute read", language_strings=language_strings) }} + {%- if page.taxonomies -%} + {{ config.extra.separator | default(value="•") }} + {%- endif -%} + {%- endif -%} + +

+ {%- endif -%} + + {%- if page.taxonomies -%} + {%- for name, taxon in page.taxonomies %} + + {%- endfor -%} + {%- endif %} +
+ +
+ {%- if page.extra.toc and page.toc | length > 0 -%} +
+ +
+ {{ macros_translate::translate(key="table_of_contents", default="Table of Contents", language_strings=language_strings) }} +
+ <{{ list_element }}> + {%- for h1 in page.toc -%} +
  • + {{ h1.title }} + {%- if h1.children -%} + <{{ list_element }}> + {%- for h2 in h1.children -%} +
  • + {{ h2.title }} +
  • + {%- endfor -%} + + {%- endif -%} + + {%- endfor -%} + +
    +
    +
    + {%- endif -%} + {%- if config.extra.show_backlinks and page.backlinks | length > 0 -%} + + {%- endif -%} + + {%- if config.extra.show_share_button -%} + + {%- endif -%} + {%- if config.extra.issues_url -%} + + {%- endif -%} +
    + + {%- include "partials/statements.html" -%} + + {%- if page.extra.toc_inline -%} + {%- include "partials/toc.html" -%} + {%- elif config.extra.toc_inline -%} + {%- include "partials/toc.html" -%} + {%- endif -%} + + {{ page.content | safe }} +
    + +{%- if page.extra.comments.id -%} + {%- include "partials/comments.html" -%} +{%- endif -%} + +{% endblock content %}