public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [PATCH olang] docs: add pandoc
@ 2024-02-17 16:22 Carlos Maniero
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Carlos Maniero @ 2024-02-17 16:22 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Carlos Maniero

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [olang/patches/.build.yml] build success
  2024-02-17 16:22 [PATCH olang] docs: add pandoc Carlos Maniero
@ 2024-02-17 16:27 ` builds.sr.ht
  2024-02-17 18:30 ` [PATCH olang] docs: add pandoc Johnny Richard
  1 sibling, 0 replies; 3+ messages in thread
From: builds.sr.ht @ 2024-02-17 16:27 UTC (permalink / raw)
  To: Carlos Maniero; +Cc: ~johnnyrichard/olang-devel

olang/patches/.build.yml: SUCCESS in 17s

[docs: add pandoc][0] from [Carlos Maniero][1]

[0]: https://lists.sr.ht/~johnnyrichard/olang-devel/patches/49600
[1]: mailto:carlos@maniero.me

✓ #1152071 SUCCESS olang/patches/.build.yml https://builds.sr.ht/~johnnyrichard/job/1152071

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH olang] docs: add pandoc
  2024-02-17 16:22 [PATCH olang] docs: add pandoc Carlos Maniero
  2024-02-17 16:27 ` [olang/patches/.build.yml] build success builds.sr.ht
@ 2024-02-17 18:30 ` Johnny Richard
  1 sibling, 0 replies; 3+ messages in thread
From: Johnny Richard @ 2024-02-17 18:30 UTC (permalink / raw)
  To: Carlos Maniero; +Cc: ~johnnyrichard/olang-devel

Applied. Thanks for the awesome work!

To git.sr.ht:~johnnyrichard/olang
   32af975..6b0363a  main -> main


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-17 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 16:22 [PATCH olang] docs: add pandoc Carlos Maniero
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

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