From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Johnny Richard <johnny@johnnyrichard.com>
Subject: [PATCH olang v1 2/3] docs: stop using pandoc to generate page on website
Date: Mon, 16 Sep 2024 18:29:13 +0200 [thread overview]
Message-ID: <20240916163004.43389-3-johnny@johnnyrichard.com> (raw)
In-Reply-To: <20240916163004.43389-1-johnny@johnnyrichard.com>
The only page being generated with pandoc is the index, since we are not
using pandoc to generate any other pages we can drop the dependency.
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
docs/Makefile | 16 ++++---------
docs/index.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++
docs/index.md | 20 ----------------
docs/template.html | 30 ------------------------
4 files changed, 62 insertions(+), 61 deletions(-)
create mode 100644 docs/index.html
delete mode 100644 docs/index.md
delete mode 100644 docs/template.html
diff --git a/docs/Makefile b/docs/Makefile
index ae5e546..3d01e0f 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,17 +1,14 @@
PANDOC := pandoc
-INDEX := index.md
+INDEX := index.html
BUILD_DIR := build
SITE_DIR := $(BUILD_DIR)/site
TARGET := $(SITE_DIR)/index.html
DIST_FILE := site.tar.gz
STYLE := style.css
-PAGES_DIR := pages
MANPAGES := $(BUILD_DIR)/man
-PAGES := $(wildcard $(PAGES_DIR)/*.md)
-HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(SITE_DIR)/$(PAGES_DIR)/%.html, $(PAGES))
.PHONY: all
-all: $(BUILD_DIR) $(STYLE) $(TARGET) $(PAGES) manpages manual
+all: $(BUILD_DIR) $(STYLE) $(TARGET) manpages manual
.PHONY: clean
clean:
@@ -35,12 +32,12 @@ $(MANPAGES)/%.1: manpages/%.md
$(DIST_FILE): all
tar -czf $(DIST_FILE) -C $(SITE_DIR) .
-$(TARGET): $(HTML_PAGES)
- $(PANDOC) -s --template template.html -f markdown -t html $(INDEX) > $(TARGET)
+$(TARGET): index.html
+ @cp $(INDEX) $(TARGET)
$(BUILD_DIR):
@mkdir -p $@
- @mkdir -p $(SITE_DIR)/$(PAGES_DIR)
+ @mkdir -p $(SITE_DIR)
@mkdir -p $(MANPAGES)
$(STYLE): $(BUILD_DIR)
@@ -50,6 +47,3 @@ $(SITE_DIR)/manual/index.html: manual/*.texi
make -C manual
rm -rf $(SITE_DIR)/manual
mv manual/html $(SITE_DIR)/manual
-
-$(SITE_DIR)/$(PAGES_DIR)/%.html: $(PAGES_DIR)/%.md
- $(PANDOC) -s --template template.html -f markdown -t html --toc $< > $@
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..bda4ddc
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>olang</title>
+ <link rel="stylesheet" href="/style.css">
+</head>
+<body>
+ <header>
+ <h1><span class="logo-name">olang</span> | O Programming Language</h1>
+ <nav>
+ <span>[ <a href="/">Home</a> ]</span>
+ <span>[ <a href="/manual/">Manual</a> ]</span>
+ <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources ↗</a> ]</span>
+ <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list ↗</a> ]</span>
+ </nav>
+ </header>
+ <article>
+ <p>
+ The O language is a system programming language crafted to be remarkably
+ simple and flexible. It stands not as a replacement for C, but rather as
+ a complementary counterpart, as both can coexist within the same source
+ code. O language boasts minimal abstraction, ensuring seamless
+ integration with C and almost predictable machine code.
+ </p>
+
+ <p>
+ olang is a deterministic system language that follows tree principles:
+ </p>
+
+ <ul>
+ <li>
+ <strong>fights complexity</strong>
+ by providing a simple syntax with a low level of abstraction
+ </li>
+ <li>
+ <strong>doesn't babysit programmers</strong>
+ it gives you the freedom of shooting your own foot
+ </li>
+ <li>
+ <strong>aims easy maintainability</strong>
+ by providing a syntax with a low refactoring overhead.
+ </li>
+ </ul>
+
+ <h2>Notice</h2>
+
+ <p>
+ This software is unfinished and not production ready.
+ </p>
+ </article>
+ <footer>
+ © 2024 olang maintainers
+ </footer>
+</body>
+</html>
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 13aab32..0000000
--- a/docs/index.md
+++ /dev/null
@@ -1,20 +0,0 @@
-% Introduction
-
-The O language is a system programming language crafted to be remarkably simple
-and flexible. It stands not as a replacement for C, but rather as a
-complementary counterpart, as both can coexist within the same source code. O
-language boasts minimal abstraction, ensuring seamless integration with C and
-almost predictable machine code.
-
-olang is a deterministic system language that follows tree principles:
-
-- **fights complexity** by providing a simple syntax with a low level of
- abstraction.
-- **doesn't babysit programmers**, it gives you the freedom of shooting your
- own foot.
-- **aims easy maintainability** by providing a syntax with a low refactoring
- overhead.
-
-## Notice
-
-This software is unfinished and not production ready.
diff --git a/docs/template.html b/docs/template.html
deleted file mode 100644
index c39ca05..0000000
--- a/docs/template.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="date" content='$date-meta$'>
- <title>$title$ | olang</title>
- <link rel="stylesheet" href="/style.css">
-</head>
-<body>
- <header>
- <h1><span class="logo-name">olang</span> | O Programming Language</h1>
- <nav>
- <span>[ <a href="/">Home</a> ]</span>
- <span>[ <a href="/manual/">Manual</a> ]</span>
- <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources ↗</a> ]</span>
- <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list ↗</a> ]</span>
- </nav>
- </header>
- <article>
- <h1>$title$</h1>
- $toc$
-
- $body$
- </article>
- <footer>
- © 2024 olang maintainers
- </footer>
-</body>
-</html>
--
2.46.0
next prev parent reply other threads:[~2024-09-16 14:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 16:29 [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard
2024-09-16 14:32 ` Carlos Maniero
2024-09-16 16:29 ` [PATCH olang v1 1/3] docs: move language spec to manual document Johnny Richard
2024-09-16 16:29 ` Johnny Richard [this message]
2024-09-16 16:29 ` [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs Johnny Richard
2024-09-16 14:31 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-16 16:37 ` [PATCH olang v1 0/3] docs: remove pandoc dependency 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=20240916163004.43389-3-johnny@johnnyrichard.com \
--to=johnny@johnnyrichard.com \
--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