[SeaBIOS] [PATCH 3/3] docs: Add mkdocs build tools for building the seabios.org website

Kevin O'Connor via SeaBIOS posted 3 patches 1 month, 2 weeks ago
[SeaBIOS] [PATCH 3/3] docs: Add mkdocs build tools for building the seabios.org website
Posted by Kevin O'Connor via SeaBIOS 1 month, 2 weeks ago
Support converting the existing SeaBIOS documentation into a website
using the mkdocs tool.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
---
 docs/_website/README                  | 12 ++++++
 docs/_website/mkdocs-requirements.txt | 10 +++++
 docs/_website/mkdocs.yml              | 62 +++++++++++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 docs/_website/README
 create mode 100644 docs/_website/mkdocs-requirements.txt
 create mode 100644 docs/_website/mkdocs.yml

diff --git a/docs/_website/README b/docs/_website/README
new file mode 100644
index 0000000..59c7c70
--- /dev/null
+++ b/docs/_website/README
@@ -0,0 +1,12 @@
+This directory defines the https://www.seabios.org/ website.
+
+To test deploy the main site locally one can use commands similar to
+the following:
+
+virtualenv ~/mkdocs-env && ~/mkdocs-env/bin/pip install -r ~/seabios/docs/_website/mkdocs-requirements.txt
+cd ~/seabios && ~/mkdocs-env/bin/mkdocs serve --config-file ~/seabios/docs/_website/mkdocs.yml -a 0.0.0.0:8000
+
+To build the main html run something similar to:
+
+virtualenv ~/mkdocs-env && ~/mkdocs-env/bin/pip install -r ~/seabios/docs/_website/mkdocs-requirements.txt
+~/mkdocs-env/bin/mkdocs build -f ~/seabios/docs/_website/mkdocs.yml -d ~/seabios-site/
diff --git a/docs/_website/mkdocs-requirements.txt b/docs/_website/mkdocs-requirements.txt
new file mode 100644
index 0000000..08410b1
--- /dev/null
+++ b/docs/_website/mkdocs-requirements.txt
@@ -0,0 +1,10 @@
+# Python virtualenv module requirements for mkdocs
+jinja2==3.1.6
+mkdocs==1.2.4
+mkdocs-material==8.1.3
+mkdocs-simple-hooks==0.1.3
+mkdocs-exclude==1.0.2
+mdx-truly-sane-lists==1.3
+mdx-breakless-lists==1.0.1
+py-gfm==2.0.0
+markdown==3.7
diff --git a/docs/_website/mkdocs.yml b/docs/_website/mkdocs.yml
new file mode 100644
index 0000000..d12806b
--- /dev/null
+++ b/docs/_website/mkdocs.yml
@@ -0,0 +1,62 @@
+# Main configuration file for mkdocs generation of www.seabios.org website
+
+# Site and directory configuration
+site_name: SeaBIOS documentation
+repo_url: https://git.seabios.org/
+use_directory_urls: False
+docs_dir: '../'
+
+# Custom markdown dialect settings
+markdown_extensions:
+  - toc:
+      permalink: True
+      toc_depth: 6
+  - attr_list
+  - mdx_partial_gfm
+  - mdx_truly_sane_lists
+  - mdx_breakless_lists
+plugins:
+  search:
+    lang: en
+
+# Website layout configuration (using mkdocs-material theme)
+theme:
+  name: material
+  palette:
+    - media: "(prefers-color-scheme: light)"
+      scheme: default
+      primary: white
+      accent: blue
+      toggle:
+        icon: material/lightbulb
+        name: Switch to dark mode
+    - media: "(prefers-color-scheme: dark)"
+      scheme: slate
+      primary: grey
+      accent: light blue
+      toggle:
+        icon: material/lightbulb-outline
+        name: Switch to light mode
+  features:
+      - navigation.top
+      - search.suggest
+      - search.highlight
+      - search.share
+  language: en
+
+# Navigation hierarchy
+nav:
+  - Download.md
+  - Releases.md
+  - Mailinglist.md
+  - Developer Documentation:
+    - Developer_Documentation.md
+    - Build_overview.md
+    - Memory_Model.md
+    - Execution_and_code_flow.md
+    - Linking_overview.md
+    - Runtime_config.md
+    - Debugging.md
+    - Contributing.md
+    - Developer_links.md
+  - SeaVGABIOS.md
-- 
2.50.1


_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org