From f21bab9d29285be3a4aaf173e13f19a8a07da230 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 31 Aug 2024 16:36:31 -0300 Subject: Setup structure skeleton --- .gitignore | 16 +++ Makefile | 183 +++++++++++++++++++++++++++++++++++ deps.mk | 47 +++++++++ mkdeps.sh | 30 ++++++ src/about.adoc | 3 + src/atom.svg | 5 + src/base.conf | 14 +++ src/blog.adoc | 3 + src/blog/1970/01/01/launch.adoc | 29 ++++++ src/blog/2000/01/01/feature-ann.adoc | 29 ++++++ src/envelope.svg | 4 + src/favicon.svg | 62 ++++++++++++ src/headers.txt | 4 + src/index.adoc | 3 + src/link.svg | 5 + src/lock.svg | 4 + src/pricing.adoc | 3 + src/privacy.adoc | 3 + src/style.css | 30 ++++++ src/terms.adoc | 3 + 20 files changed, 480 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 deps.mk create mode 100755 mkdeps.sh create mode 100644 src/about.adoc create mode 100644 src/atom.svg create mode 100644 src/base.conf create mode 100644 src/blog.adoc create mode 100644 src/blog/1970/01/01/launch.adoc create mode 100644 src/blog/2000/01/01/feature-ann.adoc create mode 100644 src/envelope.svg create mode 100644 src/favicon.svg create mode 100644 src/headers.txt create mode 100644 src/index.adoc create mode 100644 src/link.svg create mode 100644 src/lock.svg create mode 100644 src/pricing.adoc create mode 100644 src/privacy.adoc create mode 100644 src/style.css create mode 100644 src/terms.adoc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c523ba4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +/src/blog/*/*/*/*.htmlbody +/src/blog/*/*/*/*.conf +/src/blog/*/*/*/*.snippets +/src/blog/*/*/*/*.html +/src/blog/*/*/*/*.txt +/src/blog/*/*/*/*.indexentry +/src/blog/*/*/*/*.feedentry +/src/blog/*/*/*/*.sortdata +/src/*.htmlbody +/src/*.conf +/src/*.snippets +/src/*.html +/src/*.txt +/src/*.sortdata +/src/*.xml +/src/*.sentinel diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a2ca0fc --- /dev/null +++ b/Makefile @@ -0,0 +1,183 @@ +.POSIX: +DATE = 1970-01-01 +VERSION = 0.1.0 +NAME = website +NAME_UC = $(NAME) +LANGUAGES = en +## Installation prefix. Defaults to "/usr". +PREFIX = /usr +BINDIR = $(PREFIX)/bin +LIBDIR = $(PREFIX)/lib +INCLUDEDIR = $(PREFIX)/include +SRCDIR = $(PREFIX)/src/$(NAME) +SHAREDIR = $(PREFIX)/share +LOCALEDIR = $(SHAREDIR)/locale +MANDIR = $(SHAREDIR)/man +DOCDIR = $(SHAREDIR)/doc/$(NAME) +EXEC = ./ +## Where to store the installation. Empty by default. +DESTDIR = +LDLIBS = + + + +.SUFFIXES: +.SUFFIXES: .adoc .htmlbody .conf .snippets .html .indexentry .feedentry +.SUFFIXES: .sortdata .xml + +.adoc.conf: + mkwb conf src/base.conf src/global.conf $< > $@ + +.adoc.htmlbody: + mkwb htmlbody $< > $@ + +.htmlbody.html: + mkwb html $< > $@ + +.adoc.snippets: + mkwb snippets $< > $@ + +.conf.indexentry: + mkwb indexentry $< > $@ + +.htmlbody.feedentry: + mkwb feedentry $< > $@ + +.conf.sortdata: + mkwb sortdata $< > $@ + + + +all: +include deps.mk + + +sources.adoc = $(articles.adoc) $(pages.adoc) +sources.htmlbody = $(sources.adoc:.adoc=.htmlbody) +sources.html = $(sources.adoc:.adoc=.html) +sources.snippets = $(sources.adoc:.adoc=.snippets) +sources.conf = $(sources.adoc:.adoc=.conf) +articles.indexentry = $(articles.adoc:.adoc=.indexentry) +articles.feedentry = $(articles.adoc:.adoc=.feedentry) +articles.sortdata = $(articles.adoc:.adoc=.sortdata) + +sources = \ + $(sources.adoc) \ + $(images.svg) \ + src/style.css \ + +contents = \ + $(sources.html) \ + src/atom.xml \ + src/blog.html \ + +static-contents = \ + $(images.svg) \ + src/style.css \ + + +derived-assets = \ + $(contents) \ + $(sources.htmlbody) \ + $(sources.snippets) \ + $(sources.conf) \ + src/global.conf \ + $(articles.indexentry) \ + $(articles.feedentry) \ + $(articles.sortdata) \ + out/.gitignore \ + +side-assets = \ + src/blog/*/*/*/*.html*.txt \ + src/*.html.*.txt \ + src/*.sortdata \ + out/ \ + + + +## Default target. Builds all artifacts required for testing +## and installation. +all: $(derived-assets) + + +$(derived-assets): Makefile deps.mk +$(sources.conf): src/global.conf + + +src/global.conf: src/base.conf + mkwb conf src/base.conf > $@ + +src/atom.xml src/blog.html: $(articles.sortdata) src/base.conf src/global.conf + +src/atom.xml: $(articles.feedentry) + mkwb feed src/base.conf src/global.conf $(articles.sortdata) > $@ + +src/blog.html: $(articles.indexentry) src/blog.htmlbody + mkwb indexbody $*.conf $(articles.sortdata) | cat $*.htmlbody - > $@-t + mkwb html $@-t > $@ + rm -f $@-t + +out/.gitignore: + mkdir -p $(@D) + echo '*' > $@ + + + +check-unit: + + +integration-tests = \ + +.PRECIOUS: $(integration-tests) +$(integration-tests): ALWAYS + sh $@ + +check-integration: $(integration-tests) + + +## Run all tests. Each test suite is isolated, so that a parallel +## build can run tests at the same time. The required artifacts +## are created if missing. +check: check-unit check-integration + + + +## Remove *all* derived artifacts produced during the build. +## A dedicated test asserts that this is always true. +clean: + rm -rf $(derived-assets) $(side-assets) + + +## Installs into $(DESTDIR)$(PREFIX). Its dependency target +## ensures that all installable artifacts are crafted beforehand. +install: all + mkdir -p \ + '$(DESTDIR)$(SRCDIR)' \ + + for f in $(contents) $(static-contents) `cat $(sources.snippets)`; do \ + dir='$(DESTDIR)$(DOCDIR)'/"`dirname "$${f#src/}"`"; \ + mkdir -p "$$dir"; \ + cp -P "$$f" "$$dir"; \ + done + for f in $(sources); do \ + dir='$(DESTDIR)$(SRCDIR)'/"`dirname "$${f#src/}"`"; \ + mkdir -p "$$dir"; \ + cp -P "$$f" "$$dir"; \ + done + +## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror +## of the "install" target, and removes *all* that was installed. +## A dedicated test asserts that this is always true. +uninstall: + rm -rf \ + '$(DESTDIR)$(SRCDIR)' \ + '$(DESTDIR)$(DOCDIR)' \ + + + +## Run it locally. +run: + serve -n -p 3333 -d out/share/doc/website/ + + +ALWAYS: diff --git a/deps.mk b/deps.mk new file mode 100644 index 0000000..e28deed --- /dev/null +++ b/deps.mk @@ -0,0 +1,47 @@ +articles.adoc = \ + src/blog/1970/01/01/launch.adoc \ + src/blog/2000/01/01/feature-ann.adoc \ + +pages.adoc = \ + src/about.adoc \ + src/blog.adoc \ + src/index.adoc \ + src/pricing.adoc \ + src/privacy.adoc \ + src/terms.adoc \ + +images.svg = \ + src/atom.svg \ + src/envelope.svg \ + src/favicon.svg \ + src/link.svg \ + src/lock.svg \ + +src/blog/1970/01/01/launch.htmlbody src/blog/1970/01/01/launch.snippets src/blog/1970/01/01/launch.conf: src/blog/1970/01/01/launch.adoc +src/blog/2000/01/01/feature-ann.htmlbody src/blog/2000/01/01/feature-ann.snippets src/blog/2000/01/01/feature-ann.conf: src/blog/2000/01/01/feature-ann.adoc +src/about.htmlbody src/about.snippets src/about.conf: src/about.adoc +src/blog.htmlbody src/blog.snippets src/blog.conf: src/blog.adoc +src/index.htmlbody src/index.snippets src/index.conf: src/index.adoc +src/pricing.htmlbody src/pricing.snippets src/pricing.conf: src/pricing.adoc +src/privacy.htmlbody src/privacy.snippets src/privacy.conf: src/privacy.adoc +src/terms.htmlbody src/terms.snippets src/terms.conf: src/terms.adoc +src/blog/1970/01/01/launch.snippets: src/blog/1970/01/01/launch.adoc +src/blog/2000/01/01/feature-ann.snippets: src/blog/2000/01/01/feature-ann.adoc +src/about.snippets: src/about.adoc +src/blog.snippets: src/blog.adoc +src/index.snippets: src/index.adoc +src/pricing.snippets: src/pricing.adoc +src/privacy.snippets: src/privacy.adoc +src/terms.snippets: src/terms.adoc +src/blog/1970/01/01/launch.html: src/blog/1970/01/01/launch.conf src/blog/1970/01/01/launch.htmlbody +src/blog/2000/01/01/feature-ann.html: src/blog/2000/01/01/feature-ann.conf src/blog/2000/01/01/feature-ann.htmlbody +src/about.html: src/about.conf src/about.htmlbody +src/blog.html: src/blog.conf src/blog.htmlbody +src/index.html: src/index.conf src/index.htmlbody +src/pricing.html: src/pricing.conf src/pricing.htmlbody +src/privacy.html: src/privacy.conf src/privacy.htmlbody +src/terms.html: src/terms.conf src/terms.htmlbody +src/blog/1970/01/01/launch.feedentry: src/blog/1970/01/01/launch.conf src/blog/1970/01/01/launch.htmlbody +src/blog/2000/01/01/feature-ann.feedentry: src/blog/2000/01/01/feature-ann.conf src/blog/2000/01/01/feature-ann.htmlbody +src/blog/1970/01/01/launch.sortdata: src/blog/1970/01/01/launch.conf +src/blog/2000/01/01/feature-ann.sortdata: src/blog/2000/01/01/feature-ann.conf diff --git a/mkdeps.sh b/mkdeps.sh new file mode 100755 index 0000000..f319779 --- /dev/null +++ b/mkdeps.sh @@ -0,0 +1,30 @@ +#!/bin/sh +set -eu + +export LANG=POSIX.UTF-8 + + +articles() { + find src/*/ -type f -name '*.adoc' | sort +} + +pages() { + find src/*.adoc -type f | sort +} + +files() { + articles + pages +} + + +articles | varlist 'articles.adoc' +pages | varlist 'pages.adoc' +find src/*.svg | varlist 'images.svg' + + +files | sed 's/^\(.*\)\.adoc$/\1.htmlbody\t\1.snippets\t\1.conf:\t\1.adoc/' +files | sed 's/^\(.*\)\.adoc$/\1.snippets:\t\1.adoc/' +files | sed 's/^\(.*\)\.adoc$/\1.html:\t\1.conf\t\1.htmlbody/' +articles | sed 's/^\(.*\)\.adoc$/\1.feedentry:\t\1.conf\t\1.htmlbody/' +articles | sed 's/^\(.*\)\.adoc$/\1.sortdata:\t\1.conf/' diff --git a/src/about.adoc b/src/about.adoc new file mode 100644 index 0000000..8f8dd75 --- /dev/null +++ b/src/about.adoc @@ -0,0 +1,3 @@ += About + +== It's a good service diff --git a/src/atom.svg b/src/atom.svg new file mode 100644 index 0000000..37bace2 --- /dev/null +++ b/src/atom.svg @@ -0,0 +1,5 @@ + + + + diff --git a/src/base.conf b/src/base.conf new file mode 100644 index 0000000..7144806 --- /dev/null +++ b/src/base.conf @@ -0,0 +1,14 @@ +export root_dir=src +export header_links=src/headers.txt +export url_pre='https://papo.im' +export domain='papo.im' +export email='info@papo.im' +export list_addr='~euandreh/papoim@lists.sr.ht' +export discussions_url_prefix='https://lists.sr.ht/~euandreh/papoim?search=' +export sourcecode_url='https://papo.im/git/website' +export sourcecode_url_prefix="$sourcecode_url/tree" +export author='papo.im' +export site_name='papo.im: chat with freedom' +export feed_title='Articles from papo.im' +export feed_url='atom.xml' +export feed_alternate_url='blog.html' diff --git a/src/blog.adoc b/src/blog.adoc new file mode 100644 index 0000000..0694540 --- /dev/null +++ b/src/blog.adoc @@ -0,0 +1,3 @@ += Blog + +== Recent articles link:atom.xml[image:atom.svg[Standard orange RSS feed icon]] diff --git a/src/blog/1970/01/01/launch.adoc b/src/blog/1970/01/01/launch.adoc new file mode 100644 index 0000000..9a57dfe --- /dev/null +++ b/src/blog/1970/01/01/launch.adoc @@ -0,0 +1,29 @@ +//// +export sort=1 +export updatedat=1971-02-03 +//// + += Service launch! That's it "$quote" && more + +//// + +papo.im, the private team chat, is now available + +papo.im, the compatible team chat, is now available + +//// + +== papo.im, the unwalled team chat, is now available + +https://papo.im[papo.im] is the hosted instance of papo and provides paid +services to its users. + +// https://drewdevault.com/2018/11/15/sr.ht-general-availability.html + +== titulo + +primeiro + +== titulo + +segundo diff --git a/src/blog/2000/01/01/feature-ann.adoc b/src/blog/2000/01/01/feature-ann.adoc new file mode 100644 index 0000000..c7c3cca --- /dev/null +++ b/src/blog/2000/01/01/feature-ann.adoc @@ -0,0 +1,29 @@ += Feature announcement + +== New feature X + +X is launched. + +---- +$ ls +---- + +Inline `code` here. + +Block. + +---- +$ seq 10 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +---- + +End. diff --git a/src/envelope.svg b/src/envelope.svg new file mode 100644 index 0000000..c2251f4 --- /dev/null +++ b/src/envelope.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/favicon.svg b/src/favicon.svg new file mode 100644 index 0000000..ce566b2 --- /dev/null +++ b/src/favicon.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/headers.txt b/src/headers.txt new file mode 100644 index 0000000..fd144b9 --- /dev/null +++ b/src/headers.txt @@ -0,0 +1,4 @@ +./ Home +blog.html Blog +pricing.html Pricing +about.html About diff --git a/src/index.adoc b/src/index.adoc new file mode 100644 index 0000000..b976139 --- /dev/null +++ b/src/index.adoc @@ -0,0 +1,3 @@ += papo.im + +== Team chat with privacy diff --git a/src/link.svg b/src/link.svg new file mode 100644 index 0000000..e5c7050 --- /dev/null +++ b/src/link.svg @@ -0,0 +1,5 @@ + + + + diff --git a/src/lock.svg b/src/lock.svg new file mode 100644 index 0000000..1a4a18e --- /dev/null +++ b/src/lock.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/pricing.adoc b/src/pricing.adoc new file mode 100644 index 0000000..5318ba6 --- /dev/null +++ b/src/pricing.adoc @@ -0,0 +1,3 @@ += Pricing + +It's very affordable, you know? diff --git a/src/privacy.adoc b/src/privacy.adoc new file mode 100644 index 0000000..a77b26c --- /dev/null +++ b/src/privacy.adoc @@ -0,0 +1,3 @@ += Privacy Policy + +// https://man.sr.ht/privacy.md diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..4b8201f --- /dev/null +++ b/src/style.css @@ -0,0 +1,30 @@ +body { + margin: 0px auto; + max-width: 750px; + padding: 1%; +} + +pre, code { + background-color: #ddd; + border-radius: 5px; + padding: 5px; +} + +@media(prefers-color-scheme: dark) { + :root { + color: white; + background-color: black; + } + + a { + color: hsl(211, 100%, 60%); + } + + a:visited { + color: hsl(242, 100%, 80%); + } + + pre, code { + background-color: #222; + } +} diff --git a/src/terms.adoc b/src/terms.adoc new file mode 100644 index 0000000..cecbc54 --- /dev/null +++ b/src/terms.adoc @@ -0,0 +1,3 @@ += Terms of Service + +// https://man.sr.ht/terms.md -- cgit v1.2.3