From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang] docs: add pandoc
Date: Sat, 17 Feb 2024 13:22:39 -0300 [thread overview]
Message-ID: <20240217162239.3206803-1-carlos@maniero.me> (raw)
We replaced the sphinx with pandoc. This commit makes the initial setup
with a basic landing page.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
---
docs/Makefile | 24 +++++++++++++++
docs/index.md | 27 +++++++++++++++++
docs/pages/getting-started.md | 3 ++
docs/pages/hacking.md | 3 ++
docs/template.html | 55 +++++++++++++++++++++++++++++++++++
5 files changed, 112 insertions(+)
create mode 100644 docs/Makefile
create mode 100644 docs/index.md
create mode 100644 docs/pages/getting-started.md
create mode 100644 docs/pages/hacking.md
create mode 100644 docs/template.html
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..e5b7154
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,24 @@
+PANDOC := pandoc
+INDEX := index.md
+BUILD_DIR := build
+TARGET := $(BUILD_DIR)/index.html
+PAGES_DIR := pages
+PAGES := $(wildcard $(PAGES_DIR)/*.md)
+HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(BUILD_DIR)/$(PAGES_DIR)/%.html, $(PAGES))
+
+.PHONY: all
+all: $(BUILD_DIR) $(TARGET) $(PAGES)
+
+.PHONY: clean
+clean:
+ rm -rf build/
+
+$(TARGET): $(HTML_PAGES)
+ $(PANDOC) -s --template template.html -f markdown -t html $(INDEX) > $(TARGET)
+
+$(BUILD_DIR):
+ @mkdir -p $@
+ @mkdir -p $@/$(PAGES_DIR)
+
+$(BUILD_DIR)/$(PAGES_DIR)/%.html: $(PAGES_DIR)/%.md
+ $(PANDOC) -s --template template.html -f markdown -t html $< > $@
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..b6d5c1a
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,27 @@
+% Welcome to olang documentation
+
+The zero programming language.
+
+## olang manifest
+
+We, as developers, value the modern programming languages that allow us to
+produce reliable code in a short time span. However, we, as programmers, also
+lament that these same languages have diminished the joy of programming by
+imposing unnecessary constraints and complexities on our creative expression.
+
+That is why we are creating a new programming language that may not be suitable
+for most commercial applications, but that can be enjoyed in the places where
+it is meant to be used: on system applications.
+
+olang is a deterministic system language that follows two principles:
+
+- **olang fights complexity** by providing a simple syntax with a low level of abstraction;
+- **olang doesn't babysit programmers** and therefore the compiler only checks semantics.
+
+olang maintainers
+
+### Subscribe olang's development mailing list.
+
+If you want to subscribe to the mailing list, you can achieve it by sending an
+email to
+[~johnnyrichard/olang-devel+subscribe@lists.sr.ht](mailto:~johnnyrichard/olang-devel+subscribe@lists.sr.ht?subject=Subscribe&body=Subscribe)
diff --git a/docs/pages/getting-started.md b/docs/pages/getting-started.md
new file mode 100644
index 0000000..af258df
--- /dev/null
+++ b/docs/pages/getting-started.md
@@ -0,0 +1,3 @@
+% Getting stated (WIP)
+
+WIP
diff --git a/docs/pages/hacking.md b/docs/pages/hacking.md
new file mode 100644
index 0000000..2bb1338
--- /dev/null
+++ b/docs/pages/hacking.md
@@ -0,0 +1,3 @@
+% Hacking WIP
+
+WIP
diff --git a/docs/template.html b/docs/template.html
new file mode 100644
index 0000000..98cc348
--- /dev/null
+++ b/docs/template.html
@@ -0,0 +1,55 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="date" content='$date-meta$'>
+ <title>$title$ | olang</title>
+ <style>
+ :root {
+ --background-color: #2e3533;
+ --text-color: white;
+ }
+ body {
+ background: #2e3533;
+ color: white;
+ font-family: monospace;
+ font-size: 1.1rem;
+ margin: 0;
+ padding: 0;
+ }
+ a {
+ color: #8c91db;
+ }
+ article, nav, header, footer {
+ max-width: 820px;
+ margin: 10px auto;
+ }
+ header, footer {
+ margin: 70px auto;
+ }
+ article {
+ line-height: 1.75rem;
+ }
+ </style>
+ </head>
+ <body>
+ <header>
+ <h1>∅lang | The zero programming language.</h1>
+ <nav>
+ <a href="/">Index</a> |
+ <a href="/pages/getting-started.html">Getting started (WIP)</a> |
+ <a href="/pages/hacking.html">Hacking (WIP)</a> |
+ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources ↗</a> |
+ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list ↗</a>
+ </nav>
+ </header>
+ <article>
+ <h1>$title$</h1>
+
+ $body$
+ </article>
+ <footer>
+ © 2024 olang maintainers
+ </footer>
+ </body>
+</html>
--
2.34.1
next reply other threads:[~2024-02-17 16:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 16:22 Carlos Maniero [this message]
2024-02-17 16:27 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-02-17 18:30 ` [PATCH olang] docs: add pandoc Johnny Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240217162239.3206803-1-carlos@maniero.me \
--to=carlos@maniero.me \
--cc=~johnnyrichard/olang-devel@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox