From 15707ada5923c351f8a242e09e11f6ba39f99037 Mon Sep 17 00:00:00 2001 From: Hazel Noack Date: Thu, 22 May 2025 11:18:09 +0200 Subject: [PATCH] feat: english documentation up to date --- src/articles/documentation/get_started/en.md | 20 ++++++++++++++++++++ stsg/build.py | 1 + 2 files changed, 21 insertions(+) diff --git a/src/articles/documentation/get_started/en.md b/src/articles/documentation/get_started/en.md index 1266c54..fcc1c49 100644 --- a/src/articles/documentation/get_started/en.md +++ b/src/articles/documentation/get_started/en.md @@ -4,3 +4,23 @@ Here you will learn how to get started making your own website. 1. fork the project and clone the fork 2. {{installation.link}} + +## File structure + +The files that define the content can be found in `src`. There are 3 subfolders. The style and functionality is defined in `templates`. If you can't code, or you don't know what your doing, leave it alone. The static files like stylesheets or pictures exist in `static`. This folder is simply copied on build. The interesting part starts with `articles`. Here are (like the name implies) all articles. + +If something remains unclear, then the code of this documentation (should be found in your fork) could be helpful. + +## Write articles + +The text for the articles follows the following naming scheme `.md`. In this case it would be `en.md` then you can write the article normally using [markdown](https://www.markdownguide.org/) for formatting. + +If there should be subarticles, just create a new folder in the parent article folder. The folder name will be used as slug. That means it will appear in the url, and you can use it to link to other articles. + +If you want to define the metadata for the article (the name, creation date, or author), then you can do so in `index.toml`. If none exists you can just create one. Here an example of such a file. + +```toml +name="stsg" +datetime="2024-04-15 13:45:12.123456" +author="Hazel" +``` diff --git a/stsg/build.py b/stsg/build.py index 74e89e1..1aca6e3 100644 --- a/stsg/build.py +++ b/stsg/build.py @@ -13,6 +13,7 @@ import jinja2 from . import config + def get_first_header_content(content, fallback: str = ""): soup = BeautifulSoup(content, 'html.parser') for level in range(1, 7):