diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 1442386..029efa9 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -7,28 +7,53 @@ on:
jobs:
build:
- runs-on: macos-14
+ runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
+ env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
+ BUNDLE_GEMFILE: ${{ github.workspace }}/ronn-ng/Gemfile
+
steps:
- - name: Checkout
- uses: actions/checkout@v3
+ - uses: actions/checkout@v4
+
+ - name: Clone ronn-ng repository
+ uses: GuillaumeFalourd/clone-github-repo-action@v2.3
+ with:
+ depth: 1
+ branch: 'main'
+ owner: 'ibokuri'
+ repository: 'ronn-ng'
+
+ - name: Install Ruby and Bundler; Install ronn-ng dependencies
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: '3.3'
+ working-directory: ronn-ng/
- - name: Update Homebrew
+ - name: Directory setup
run: |
- brew update
+ mkdir public
+ cd ronn-ng/
- - name: Install Packages
+ - name: Build site files
run: |
- brew install coreutils groff gnu-sed scdoc
+ bundle install --with development
+ bundle exec bin/ronn \
+ --html \
+ --output-dir="../public/" \
+ --manual="General Commands Manual" \
+ --section=1 \
+ --name="danh.computer" \
+ ../md/*.md
- - name: Build site
- run: make build
+ - name: Clean up
+ run: |
+ cd -
+ rm -rf ronn-ng/
- name: Add CNAME file
- run: |
- echo "danh.computer" > public/CNAME
+ run: echo "danh.computer" > public/CNAME
- name: Deploy site
uses: s0/git-publish-subdir-action@develop
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 7b99f4c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,84 +0,0 @@
-SCD_DIR := scd
-ROFF_DIR := man
-HTML_DIR := html
-CSS_DIR := css
-OUTPUT_DIR := public
-
-TEMPLATE_FILE := $(HTML_DIR)/template.html
-
-SCD_FILES := $(wildcard $(SCD_DIR)/*.scd)
-ROFF_FILES := $(patsubst $(SCD_DIR)/%.scd,$(ROFF_DIR)/%.roff,$(SCD_FILES))
-HTML_FILES := $(patsubst $(ROFF_DIR)/%.roff,$(OUTPUT_DIR)/%.html,$(ROFF_FILES))
-
-CNAME := danh.computer
-
-.PHONY: all clean roff build
-
-all: build
-
-roff: $(ROFF_FILES)
-build: $(HTML_FILES)
-
-clean:
- @rm -rf $(ROFF_DIR)
- @rm -rf $(OUTPUT_DIR)
-
-$(ROFF_DIR)/%.roff: $(SCD_DIR)/%.scd | $(ROFF_DIR)
- @echo $@
- @scdoc < $< > $@
-
-$(OUTPUT_DIR)/%.html: $(ROFF_DIR)/%.roff | $(OUTPUT_DIR)
- @echo $@
- @cp $(HTML_DIR)/index.html $(OUTPUT_DIR)/
- @cp $(CSS_DIR)/style.css $(OUTPUT_DIR)/
-
-# The following command obtains the text underneath the NAME section in the
-# current ROFF file. It'll be used as the
for the final HTML file.
- $(eval title := $(shell grep -A 2 '\.SH NAME' $< | tail -1))
-
-# The following command obtains date on which the page was generated.
- $(eval tmp_date := $(shell grep '\.TH' $< | grep -oE '\d{4}-\d{2}-\d{2}'))
- $(eval page_date := $(shell date -jf "%Y-%m-%d" ${tmp_date} +"%B %-d, %Y"))
-
-# The following command converts a ROFF file into HTML.
-#
-# 1. Omit the section header, as that's hardcoded in the template.
-#
-# 2. Omit the section footer, as that's partially hardcoded in the template,
-# and the rest we'll construct that ourselves.
-#
-# 3. Replace *bold* escape sequences with their HTML equivalent.
-#
-# 4. Fix spacing for resulting tags. There might be extra spaces
-# before the tag and no space after it due to how nroff positions the
-# escape sequences.
-#
-# 5. Condense contiguous space characters after ',', '.', '?', and words
-# into a single space. In order to fully justify the text, nroff adds
-# additional spaces sometimes, so those extra spaces are removed here.
-#
-# 6. Replace *underline* escape sequences with their HTML equivalent.
-#
-# 7. Replace '{{content}}' in the page template with the man page.
-#
-# 8. Replace '{{title}}' in the page template with the man page's name.
-#
-# 9. Replace '{{date}}' in the page template with the page's creation date.
- @nroff -man $< \
- | tail +3 \
- | ghead -n -2 \
- | perl -pe 's/\x1b\[1m(.*?)\x1b\[(22|0)m/\1<\/b>/gs' \
- | gsed -E -e 's/ +<\/b>/<\/b> /g' \
- | gsed -E -e 's/(,|\.|\?|\w) +(\w|<|[0-9])/\1 \2/g' \
- | perl -pe 's/\x1b\[4m(.*?)\x1b\[24m/\1<\/u>/gs' \
- | gsed -E -e '/\{\{content\}\}/{r /dev/stdin' -e 'd;}' "$(TEMPLATE_FILE)" \
- | gsed -E -e 's/\{\{title\}\}/${title}/' \
- | gsed -E -e 's/\{\{date\}\}/${page_date}/' \
- > $@
-
-$(ROFF_DIR):
- @mkdir -p $(ROFF_DIR)
-
-$(OUTPUT_DIR): $(ROFF_DIR)
- @mkdir -p $(OUTPUT_DIR)
-
diff --git a/css/style.css b/css/style.css
deleted file mode 100644
index 436b6c3..0000000
--- a/css/style.css
+++ /dev/null
@@ -1,48 +0,0 @@
-:root {
- --font-family-main: monospace;
- --font-size-small: 6pt;
-
- --padding-small: 7.1px;
- --max-width: 610.5px;
-
- --background-color: #ffffff;
- --text-color: #000;
- --link-color: #0000EE;
-}
-
-nav ul,
-footer ul {
- display: flex;
- justify-content: space-between;
- list-style-type: none;
- padding: 0;
- margin: 0;
- max-width: var(--max-width);
-}
-
-body {
- font-family: var(--font-family-main);
- max-width: var(--max-width);
- margin: 0;
- padding: 10px 10px 0 10px;
- background-color: var(--background-color);
- color: var(--text-color);
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-
-@media screen and (max-width: 400px) {
- body {
- padding: var(--padding-small) var(--padding-small) 0 var(--padding-small);
- font-size: var(--font-size-small);
- }
-}
-
-a {
- color: var(--link-color);
- text-decoration: none;
-
- &:hover {
- text-decoration: underline;
- }
-}
diff --git a/html/index.html b/html/index.html
deleted file mode 100644
index 8074815..0000000
--- a/html/index.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
-
- Danh Phan
-
-
-
-NAME
- Danh Phan
-
-SYNOPSIS
- danh [OPTIONS]
- jason [OPTIONS]
-
-OPTIONS
- -h, --help
-
- Prints a short help message and exits.
-
- -v, --version
-
- Prints version information and exits.
-
- --email=ADDRESS
-
- Specifies the email address of the site owner. The default is
- input@danh.computer.
-
- --github=USERNAME
-
- Specifies the GitHub username of the site owner. The default is
- ibokuri.
-
- --employer=COMPANY
-
- Specifies the current employer of the site owner. The default is
- DigitalOcean.
-
-SEE ALSO
- 2024‐03‐02 Test Blog Post
-
-
-
-
diff --git a/html/template.html b/html/template.html
deleted file mode 100644
index 5de49ff..0000000
--- a/html/template.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
- {{title}}
-
-
-
-{{content}}
-
-
-
diff --git a/md/index.md b/md/index.md
new file mode 100644
index 0000000..d8d9d2d
--- /dev/null
+++ b/md/index.md
@@ -0,0 +1,32 @@
+personal website
+================
+
+## SYNOPSIS
+
+`danh` [_OPTIONS_]
+
+`jason` [_OPTIONS_]
+
+## OPTIONS
+
+ * `-h`, `--help`:
+ Prints a short help message and exits.
+
+ * `-v`, `--version`:
+ Prints version information and exits.
+
+ * `--email`=ADDRESS:
+ Specifies the email address of the site owner. The default is
+ [input@danh.computer](mailto:input@danh.computer).
+
+ * `--github`=USERNAME:
+ Specifies the GitHub username of the site owner. The default is
+ [ibokuri](https://github.com).
+
+ * `--employer`=COMPANY:
+ Specifies the current employer of the site owner. The default is
+ [DigitalOcean](https://digitalocean.com).
+
+## SEE ALSO
+
+2024-03-10 [Test Blog Post](https://danh.computer/test)