switch to markdown

This commit is contained in:
Renken 2022-07-13 00:07:32 +02:00
parent 000993e3ca
commit 62b60f3f53
Signed by: renken
GPG key ID: 1F2BB159B645E575
3 changed files with 20 additions and 14 deletions

View file

@ -31,7 +31,7 @@
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ['sphinxcontrib.plantuml'] extensions = ['sphinxcontrib.plantuml', 'myst_parser']
# plantuml config # plantuml config
plantuml = '@PLANTUML_PATH@ -config "@PROJECT_SOURCE_DIR@/doc/plantuml.cfg"' plantuml = '@PLANTUML_PATH@ -config "@PROJECT_SOURCE_DIR@/doc/plantuml.cfg"'
@ -45,7 +45,10 @@ templates_path = []
# You can specify multiple suffix as a list of string: # You can specify multiple suffix as a list of string:
# #
# source_suffix = ['.rst', '.md'] # source_suffix = ['.rst', '.md']
source_suffix = '.rst' source_suffix = {
'.md': 'markdown',
'.rst': 'restructuredtext',
}
# The master toctree document. # The master toctree document.
master_doc = 'index' master_doc = 'index'

View file

@ -17,14 +17,16 @@ for dir in "$archive" "$archive/$year" "$archive/$year/$month"; do
name=Archive name=Archive
fi fi
<<-EOF cat - >"$dir/index.rst" <<-EOF cat - >"$dir/index.rst"
$name # $name
$(printf '%s\n' "$name" | sed -E 's|.|=|g')
.. toctree:: \`\`\`{toctree}
$(printf '\t'):glob: ---
$(printf '\t'):maxdepth: 1 $(printf '\t')glob
$(printf '\t')maxdepth: 1
---
$(printf '\t')*/index $(printf '\t')*/index
\`\`\`
EOF EOF
fi fi
done done
@ -32,14 +34,14 @@ done
mkdir -- "$archive/$year/$month/$timestamp" mkdir -- "$archive/$year/$month/$timestamp"
<<-EOF cat - >"$archive/$year/$month/$timestamp/index.rst" <<-EOF cat - >"$archive/$year/$month/$timestamp/index.md"
$title # $title
$(printf '%s\n' "$title" | sed -E 's|.|=|g') *Written $title*
.. contents:: \`\`\`{contents}
\`\`\`
TODO ## TODO
----
EOF EOF
printf '%s\n' "$archive/$year/$month/$timestamp" printf '%s\n' "$archive/$year/$month/$timestamp"

View file

@ -1,3 +1,4 @@
Sphinx Sphinx
myst-parser
sphinx_rtd_theme sphinx_rtd_theme
sphinxcontrib.plantuml sphinxcontrib.plantuml