From 5b4eb729791c5fc350cdb358d0fea453fac7e2cc Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 10:50:54 +0000 Subject: [PATCH 1/7] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 49948db..4193c79 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # hydrogen -Simplistic static site generator \ No newline at end of file +Simplistic static site generator + +### Quickstart +```git clone https://git.exocortex.ru/Exocortex/hydrogen.git``` +```cd hydrogen && pip install -r requirements``` +```./hydrogen.py``` \ No newline at end of file From c9b74399ec676d076f56511d1087d9c479f31454 Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 10:51:14 +0000 Subject: [PATCH 2/7] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4193c79..f7f0c1f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Simplistic static site generator -### Quickstart -```git clone https://git.exocortex.ru/Exocortex/hydrogen.git``` -```cd hydrogen && pip install -r requirements``` -```./hydrogen.py``` \ No newline at end of file +## Quickstart +```git clone https://git.exocortex.ru/Exocortex/hydrogen.git``` +```cd hydrogen && pip install -r requirements``` +```./hydrogen.py``` \ No newline at end of file From 12876dd7905fe256fbd9a08315831916386ad4b6 Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 10:56:53 +0000 Subject: [PATCH 3/7] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7f0c1f..ec1f997 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,11 @@ Simplistic static site generator ## Quickstart ```git clone https://git.exocortex.ru/Exocortex/hydrogen.git``` ```cd hydrogen && pip install -r requirements``` -```./hydrogen.py``` \ No newline at end of file +```./hydrogen.py``` + +## Expectations +`hydrogen` expects the following files in the `content` folder: +- Markdown files ('*.md' only): these are the text files rendered to the HTML. +- Image files ('*.jpg' only): if a '.jpg' file is present with the same name as an '.md' file, the '.jpg' file will be rendered at the top of the HTML page and in the preview card for the entry. +- Custom CSS files ('.css' only): if a '.css' file is present with the same name as an '.md' file, it will be included in the HTML page. +- Custom Javascript files ('.js' only): if a '.js' file is present with the same name as an '.md' file, it will be included in the HTML page _for late loading_. From 99a6b9dbdf827fc48f63ab8242abceba9574d136 Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 11:17:15 +0000 Subject: [PATCH 4/7] Update README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ec1f997..c34fb22 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,43 @@ Simplistic static site generator ## Quickstart -```git clone https://git.exocortex.ru/Exocortex/hydrogen.git``` -```cd hydrogen && pip install -r requirements``` -```./hydrogen.py``` +`git clone https://git.exocortex.ru/Exocortex/hydrogen.git` +`cd hydrogen && pip install -r requirements` +_put some Markdown files into the `content` directory_ +`./hydrogen.py` -## Expectations -`hydrogen` expects the following files in the `content` folder: +## Conventions / expectations +`hydrogen` expects the following files in the `content` directory: - Markdown files ('*.md' only): these are the text files rendered to the HTML. -- Image files ('*.jpg' only): if a '.jpg' file is present with the same name as an '.md' file, the '.jpg' file will be rendered at the top of the HTML page and in the preview card for the entry. -- Custom CSS files ('.css' only): if a '.css' file is present with the same name as an '.md' file, it will be included in the HTML page. -- Custom Javascript files ('.js' only): if a '.js' file is present with the same name as an '.md' file, it will be included in the HTML page _for late loading_. +- Image files ('*.jpg' only): if a '.jpg' file is present in the `content` directory and has the same name as an '.md' file, the '.jpg' file will be rendered at the top of the HTML page and in the preview card for the entry. +- Custom CSS files ('.css' only): if a '.css' file is present in the `content` directory and has the same name as an '.md' file, it will be included in the HTML page. +- Custom Javascript files ('.js' only): if a '.js' file is present in the `content` directory and has the same name as an '.md' file, it will be included in the HTML page _for late loading_. + +## Required syntax +The resulting HTML files are rendered from the Markdown source files in the `content` folder, so even the plain text source files will work. +The correct HTML may be included directly in the source file and will be rendered both in the preview card and in the HTML page. +`frontmatter` header is recommended, specifying the following values: +- `title`: "Will be rendered in the preview card and in the HTM page" (String) +- `omit_second_title`: "Should the title be displayed immediately above the text in the HTML page (HTML page always also displays the title in the header) (Boolean, `True|False`) +- `date`: Timestamp, like the date and time the text was created. (`2000-01-01T00:00:00+03:00"`) + +## Configuration +Configuration is minimal and done via the self-explanatory `config.py` file. + +## Customization +Individual HTML pages can be customized via CSS and Javascript. To do so, put a '.css' and/or '.js' file into the `content` directory and make sure those files have the same name as the source '.md file'. E.g.: +- `article-01.md` - source file rendered to HTML. +- `article-01.css` - a CSS file with custom styles for the resulting HTML page. +- `article-01.js` - a Javasscript file with custom logic for the resulting HTML page. + +## Directories and structure +### Output directories +- `public` - main output directory, which can be served via a web server. +- `assets` - contains the resulting custom CSS and JS snippets. +- `images` - contains the resulting images rendered in the HTML pages. + +### Input directories +- `content` - contains the source Markdown. images, CSS and Javascript customization files. +- `static` - contains static image files and the special `about.md` source file. +- `templates` - contains Jinja2 templates for rendering Markdown to HTML. + From 5c839c787b98ea802f282da37bd8d405c89f7e44 Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 11:18:05 +0000 Subject: [PATCH 5/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c34fb22..8ea00cb 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ The resulting HTML files are rendered from the Markdown source files in the `con The correct HTML may be included directly in the source file and will be rendered both in the preview card and in the HTML page. `frontmatter` header is recommended, specifying the following values: - `title`: "Will be rendered in the preview card and in the HTM page" (String) -- `omit_second_title`: "Should the title be displayed immediately above the text in the HTML page (HTML page always also displays the title in the header) (Boolean, `True|False`) -- `date`: Timestamp, like the date and time the text was created. (`2000-01-01T00:00:00+03:00"`) +- `omit_second_title`: "Should the title be displayed immediately above the text in the HTML page (HTML page always also displays the title in the header) (Boolean, "True|False") +- `date`: Timestamp, like the date and time the text was created. ("2000-01-01T00:00:00+03:00") ## Configuration Configuration is minimal and done via the self-explanatory `config.py` file. From 9594cdd45746ed79558e9da08d1e5253d6ccf2f1 Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 11:18:15 +0000 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ea00cb..d461a67 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Simplistic static site generator ## Quickstart `git clone https://git.exocortex.ru/Exocortex/hydrogen.git` `cd hydrogen && pip install -r requirements` -_put some Markdown files into the `content` directory_ +_put some Markdown files into the `content` directory_ `./hydrogen.py` ## Conventions / expectations From 62b2de611a1def13cd2805ea638b56bc97fe921b Mon Sep 17 00:00:00 2001 From: sg Date: Thu, 5 Jun 2025 11:18:50 +0000 Subject: [PATCH 7/7] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d461a67..1182f55 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,13 @@ Simplistic static site generator ## Quickstart `git clone https://git.exocortex.ru/Exocortex/hydrogen.git` + `cd hydrogen && pip install -r requirements` + _put some Markdown files into the `content` directory_ `./hydrogen.py` + ## Conventions / expectations `hydrogen` expects the following files in the `content` directory: - Markdown files ('*.md' only): these are the text files rendered to the HTML.