diff options
author | Starfall <us@starfall.systems> | 2021-10-22 22:14:41 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-12-05 10:00:27 -0600 |
commit | 5b63c384ef8e100518ff50b9cb023ac07265df35 (patch) | |
tree | 2fb7c335f6b050e3c2bce2573f37881d62780021 | |
parent | 86b9f8635be129da9b367aec9f4d907e9785cf0e (diff) |
strike: set goals for config file format
-rw-r--r-- | README | 22 | ||||
-rw-r--r-- | sample/blog/also-exclude.html | 1 | ||||
-rw-r--r-- | sample/blog/empty.html | 0 | ||||
-rw-r--r-- | sample/blog/exclude.html | 1 | ||||
-rw-r--r-- | sample/blog/happy.html | 1 | ||||
-rw-r--r-- | sample/strike.ini | 21 | ||||
-rw-r--r-- | sample/template.html | 13 |
7 files changed, 54 insertions, 5 deletions
diff --git a/README b/README index 454d931..f8aefaa 100644 --- a/README +++ b/README @@ -21,13 +21,25 @@ And some stretch goals to turn it into a blog generator: * Turn the extra page into a flexible component that can be added into any other page * Use different templates on different files -Markup: +strike.ini file +--------------- + +Strike should be passed the location of a .ini file or a directory containing a file named strike.ini. This is a text file in Python's configparser format (for now). You can see an example config file in the sample directory. + +Markup +------ + +TBD. No markup is used at the moment. reStructuredText fulfills most of our desires: https://docutils.sourceforge.io/rst.html It generates <section>s and has specific markup for page titles. -Templating: -Complicated templating isn't necessary, just pre-content and post-content boilerplate for now. -The slight gotcha is that the page title may need updated as well, but we'll cross that bridge if we have to. +Templating +---------- + +TBD. Right now, templates should be written in plain HTML. The special marker ${content} will be replaced with all custom page content (also in raw HTML). + +Front matter +------------ -Front matter: None for now. + diff --git a/sample/blog/also-exclude.html b/sample/blog/also-exclude.html new file mode 100644 index 0000000..6ce0fb1 --- /dev/null +++ b/sample/blog/also-exclude.html @@ -0,0 +1 @@ +This file shouldn't be processed by Strike either. diff --git a/sample/blog/empty.html b/sample/blog/empty.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sample/blog/empty.html diff --git a/sample/blog/exclude.html b/sample/blog/exclude.html new file mode 100644 index 0000000..d881dce --- /dev/null +++ b/sample/blog/exclude.html @@ -0,0 +1 @@ +This file should be excluded from processing when Strike is processed using strike.ini diff --git a/sample/blog/happy.html b/sample/blog/happy.html new file mode 100644 index 0000000..af5626b --- /dev/null +++ b/sample/blog/happy.html @@ -0,0 +1 @@ +Hello, world! diff --git a/sample/strike.ini b/sample/strike.ini new file mode 100644 index 0000000..4ccc027 --- /dev/null +++ b/sample/strike.ini @@ -0,0 +1,21 @@ +[Input] +# Directory with all of the markup files that you want Strike to process. +# Location should be relative to this config file. +# For now, Strike will only process files in this directory and not in any subdirectories. +directory = blog +# Files in the input directory to exclude. +# Location should be relative to the default input directory. +excludes = exclude.html + also-exclude.html + +[Templates] +# For now, Strike only supports using a single template, named default. +default = template.html + +[Output] +# Directory to put the output into. +# When Strike processes subdirectories, this will become the base directory - output will be placed into the same subdirectory relative to this as it was to the input directory. +directory = html + +# That's all for now. In the future, we hope to allow the use of multiple templates, +# letting you choose individual directories and files for each template. diff --git a/sample/template.html b/sample/template.html new file mode 100644 index 0000000..3e94683 --- /dev/null +++ b/sample/template.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html lang=en-US dir=ltr> +<title>aaaa need a title</title> +<meta charset=UTF-8> +<meta name=robots content="noindex, nofollow"> +<meta name=viewport content="width=device-width, initial-scale=1"> + +<section> + ${content} +</section> +<footer> + <p>This page was generated by <a href=https://git.starfall.systems/strike>Strike</a>. +</footer> |