feat(docs): create sukr documentation site
Self-documenting docs site built with sukr itself (dogfooding): - docs/site.toml with sukr.io base URL - docs-specific templates with sidebar navigation - Dark theme CSS, responsive layout - Documentation: getting-started, configuration, features Also: improved error chaining for better template debugging
This commit is contained in:
37
docs/templates/base.html
vendored
Normal file
37
docs/templates/base.html
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{ title }} | {{ config.title }}</title>
|
||||
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
||||
<link rel="stylesheet" href="{{ prefix }}/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<aside class="sidebar">
|
||||
<header>
|
||||
<a href="{{ prefix }}/index.html" class="logo">sukr</a>
|
||||
<span class="tagline">suckless static sites</span>
|
||||
</header>
|
||||
<nav>
|
||||
{% for item in nav %}
|
||||
<a
|
||||
href="{{ prefix }}{{ item.path }}"
|
||||
{%
|
||||
if
|
||||
page_path=""
|
||||
="item.path"
|
||||
%}
|
||||
class="active"
|
||||
{%
|
||||
endif
|
||||
%}
|
||||
>{{ item.label }}</a
|
||||
>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</aside>
|
||||
<main>{% block content %}{% endblock content %}</main>
|
||||
</body>
|
||||
</html>
|
||||
9
docs/templates/content/default.html
vendored
Normal file
9
docs/templates/content/default.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<article class="doc-page">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.description %}
|
||||
<p class="lead">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
<section class="content">{{ content | safe }}</section>
|
||||
</article>
|
||||
{% endblock content %}
|
||||
9
docs/templates/homepage.html
vendored
Normal file
9
docs/templates/homepage.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<article class="homepage">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.description %}
|
||||
<p class="lead">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
<section class="content">{{ content | safe }}</section>
|
||||
</article>
|
||||
{% endblock content %}
|
||||
9
docs/templates/page.html
vendored
Normal file
9
docs/templates/page.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<article class="page">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% if page.description %}
|
||||
<p class="lead">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
<section class="content">{{ content | safe }}</section>
|
||||
</article>
|
||||
{% endblock content %}
|
||||
18
docs/templates/section/default.html
vendored
Normal file
18
docs/templates/section/default.html
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<article class="section-index">
|
||||
<h1>{{ section.title }}</h1>
|
||||
{% if section.description %}
|
||||
<p class="lead">{{ section.description }}</p>
|
||||
{% endif %}
|
||||
<nav class="section-nav">
|
||||
{% for item in items %}
|
||||
<a href="{{ prefix }}{{ item.path }}" class="section-link">
|
||||
<strong>{{ item.frontmatter.title }}</strong>
|
||||
{% if item.frontmatter.description %}
|
||||
<span>{{ item.frontmatter.description }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</article>
|
||||
{% endblock content %}
|
||||
18
docs/templates/section/features.html
vendored
Normal file
18
docs/templates/section/features.html
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
<article class="section-index">
|
||||
<h1>{{ section.title }}</h1>
|
||||
{% if section.description %}
|
||||
<p class="lead">{{ section.description }}</p>
|
||||
{% endif %}
|
||||
<nav class="section-nav">
|
||||
{% for item in items %}
|
||||
<a href="{{ prefix }}{{ item.path }}" class="section-link">
|
||||
<strong>{{ item.frontmatter.title }}</strong>
|
||||
{% if item.frontmatter.description %}
|
||||
<span>{{ item.frontmatter.description }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</article>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user