diff --git a/.control/remote-ssh-target b/.control/remote-ssh-target new file mode 100644 index 0000000..0a1afbe --- /dev/null +++ b/.control/remote-ssh-target @@ -0,0 +1 @@ +/var/www/htdocs/ diff --git a/.control/static-files b/.control/static-files new file mode 100644 index 0000000..f2eb0a6 --- /dev/null +++ b/.control/static-files @@ -0,0 +1,7 @@ +src/assets +src/distfiles +src/favicon.* +src/gpg.txt +src/images +src/paste +src/smoke* diff --git a/Makefile b/Makefile index 903115a..6baf85d 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,42 @@ -all: website fix-permissions +all: + make -s website -# Extensions: +debug: + make website + +# Extensions in src/ # th - template with html code # ph - page with html code # pm - page with markdown code # ps - page with shell code # pa - page with asciidoctor code +# pt - page with plain text PH_FILES != find src -type f -name "*.ph" | sed 's|src/||g' PM_FILES != find src -type f -name "*.pm" | sed 's|src/||g' PS_FILES != find src -type f -name "*.ps" | sed 's|src/||g' PA_FILES != find src -type f -name "*.pa" | sed 's|src/||g' +PT_FILES != find src -type f -name "*.pt" | sed 's|src/||g' -STATIC_FILES = src/assets +STATIC_FILES != cat .control/static-files +REMOTE != cat .control/remote-ssh-target $(PH_FILES): echo "Create: src/$@ => www/${@:S/ph/html/}" + mkdir -p "$$(dirname www/${@})" cat src/header.th > www/${@:S/ph/html/} cat src/$@ >> www/${@:S/ph/html/} cat src/footer.th >> www/${@:S/ph/html/} +$(PT_FILES): + echo "Create: src/$@ => www/${@:S/pt/html/}" + mkdir -p "$$(dirname www/${@})" + cat src/header.th > www/${@:S/pt/html/} + echo "
" >> www/${@:S/pt/html/}
+ cat src/$@ >> www/${@:S/pt/html/}
+ echo "" >> www/${@:S/pt/html/}
+ cat src/footer.th >> www/${@:S/pt/html/}
+
$(PM_FILES):
echo "Create: src/$@ => www/${@:S/pm/html/}"
mkdir -p "$$(dirname www/${@})"
@@ -46,20 +63,26 @@ $(PA_FILES):
-o - src/$@ >> www/${@:S/pa/html/}
cat src/footer.th >> www/${@:S/pa/html/}
-website: prepare copy-static-files $(PH_FILES) $(PM_FILES) $(PS_FILES) $(PA_FILES)
+website: prepare copy-static-files $(PH_FILES) $(PM_FILES) $(PS_FILES) $(PA_FILES) $(PT_FILES)
prepare:
echo "Mkdir: www"
mkdir -p www
copy-static-files: prepare
- rsync -r --partial --delete --out-format="Copy: src/%f => www/%f" $(STATIC_FILES) www/
+ rsync -a --partial --delete --no-p --no-o --no-g --out-format="Copy: %f => www/" $(STATIC_FILES) www/
clean:
+ make -s _clean
+_clean:
+ echo "Delete: www"
rm -rf www
-fix-permissions: website
- chown -R sdk:www www
- chmod -R ug+Xrw www
-
-
+install:
+ make -s _install
+_install: website
+ echo "Fixing Permissions in www/"
+ doas chown -R sdk:www www
+ doas chmod -R ugo+Xrw www
+ echo "Deploy: www/ => /var/www/htdocs/"
+ cd www && doas rsync -a --partial --delete --exclude "*/cache/*" --out-format="Deploy: %f => /var/www/htdocs/%f" * $(REMOTE)
diff --git a/README.md b/README.md
index 437be98..3de1df2 100644
--- a/README.md
+++ b/README.md
@@ -19,11 +19,13 @@ src/footer.th gets appended to every file.
.pm files contain markdown source.
.ph files contain plain html.
.ps files contain ksh shell script (the scripts must output html to stdout).
+.pt files contain plain text.
-Everything in src/assets is copied as is.
+Everything in `.control/static-files` is copied as is.
-Execute `make` to create the website with debug output.
-Execute `make -s` to hide the debug output.
+Execute `make debug` to create the website with debug output.
+Execute `make` to hide the debug output.
+Execute `make install` to copy the page to the remote in `.control/remote-ssh-target`.
The generated website will be in the directory `www`.
diff --git a/src/assets/bungee.ttf b/src/assets/bungee.ttf
new file mode 100644
index 0000000..2b5bbd3
Binary files /dev/null and b/src/assets/bungee.ttf differ
diff --git a/src/assets/style.css b/src/assets/style.css
index 70227a1..46219f5 100644
--- a/src/assets/style.css
+++ b/src/assets/style.css
@@ -1,1529 +1,33 @@
-body {
- font-family:bree serif,sans-serif;
- -webkit-font-smoothing:antialiased;
- margin: 0 20px
+@font-face {
+ font-family: 'bungee shade';
+ src: url('/assets/bungee.ttf');
}
-article {
- max-width:800px;
- margin-left:auto;
- margin-right:auto
+.header-title {
+ text-decoration: none;
+ font-size: 2rem;
+ font-weight: 700;
+ font-family: bungee shade,sans-serif;
}
-a {
- color:#000;
- text-decoration:none
+.header-title a {
+ color: black;
}
-a:hover {
- font-weight:600;
- text-decoration:underline
+.header-row {
+ margin-top: 10px;
+ margin-bottom: 2px;
}
-.post-ads
-{
- margin:50px 0
+.header-item {
+ color: black;
+ text-decoration: none;
+ margin-right: 0,5rem;
}
-.markdown-body
-{
- font-size:18px;
- max-width:100%
-}
-
-.markdown-body a
-{
-
- text-decoration:underline;
- text-decoration-color:#000
-}
-
-.markdown-body blockquote
-{
-
- margin:0;
- padding:0 1em;
- color:#57606a;
- border-left:.25em solid #d0d7de
-}
-
-.markdown-body pre
-{
-
- padding:12px;
- overflow:auto;
- background-color:#f6f8fa;
- border-radius:8px
-}
-
-.markdown-body code
-{
-
- padding:.2em .4em;
- background-color:#f6f8fa;
- border-radius:6px
-}
-
-.markdown-body pre>code
-{
-
- padding:0;
- background-color:inherit;
- border:0
-}
-
-.Chinese .markdown-body
-{
-
- line-height:200%
-}
-
-.site-date-catalog
-{
-
- font-size:2rem
-}
-
-.header-title
-{
-
- font-size:2rem;
- font-weight:700;
- margin-top:32px;
- font-family:bungee shade,sans-serif
-}
-
-.header-title a
-{
-
- text-decoration:none
-}
-
-.header-subtitle
-{
-
- color:#666
-}
-
-.header-items
-{
-
- margin:10px 0
-}
-
-.header-item
-{
-
- margin:0 5px
-}
-
-.header-line
-{
-
- width:100%;
- border-width:2px;
- border-color:#482936;
- border-style:solid none none none
-}
-
-.lang-switch
-{
-
- font-weight:600
-}
-
-#posts-list
-{
-
- min-height:600px
-}
-
-.posts-line
-{
-
- font-size:1.2rem;
- margin:12px 0
-}
-
-.posts-categories
-{
-
- font-size:.8rem;
- margin:auto;
- text-align:center
-}
-
-.posts-category
-{
-
- padding:3px 0;
- border:#000 2px solid;
- border-radius:5px
-}
-
-.site-footer
-{
-
- margin-top:50px
-}
-
-.site-footer-item
-{
-
- margin-right:12px
-}
-
-.post-content img
-{
-
- max-width:100%;
- display:block;
- margin-right:auto;
- margin-top:12px
-}
-
-.post-header
-{
-
- margin-bottom:50px
-}
-
-.post-title
-{
-
- font-size:2rem;
- font-weight:600
-}
-
-.post-tags
-{
-
- display:inline;
- font-weight:600;
- padding:2px 5px;
- margin-right:6px;
- border:#000 2px solid;
- border-radius:5px
-}
-
-.post-date
-{
-
- font-weight:800;
- font-style:italic
-}
-
-.post-author
-{
-
- float:right;
- font-weight:600
-}
-
-.page-content
-{
-
- min-height:60%
-}
-
-.post-content
-{
-
- margin-bottom:50px
-}
-
-.post-content p
-{
-
- hyphens:auto;
- line-height:1.8;
- text-justify:ideographic;
- margin-bottom:1em
-}
-
-.related-content
-{
-
- border-width:3px;
- border-style:solid;
- border-color:#000;
- padding:0 10px;
- margin-bottom:50px;
- margin-top:100px
-}
-
-.related-content li
-{
-
- margin:5px 0
-}
-
-.taxonomy-term
-{
-
- font-size:3rem
-}
-
-.gallery-img
-{
-
- text-align:center
-}
-
-.gallery-img span
-{
-
- text-align:center
-}
-
-.gallery-img-desc
-{
-
- font-size:.8em;
- font-weight:800
-}
-
-#disqus_thread
-{
-
- position:relative
-}
-
-#disqus_thread:after
-{
-
- content:"";
- display:block;
- height:55px;
- width:100%;
- position:absolute;
- bottom:0;
- background:#fff
-}
-
-@media screen and (max-width:600px)
-{
-
- .header-title,.header-subtitle,.header-items
- {
-
- text-align:center
- }
-
- .posts-line
- {
-
- font-size:16px
- }
-
- .markdown-body
- {
-
- font-size:16px
- }
-
- .post-title
- {
-
- font-size:2rem
- }
-
- .post-content p
- {
-
- letter-spacing:.05em
- }
-
-
-}
-
-@media screen and (max-width:48em)
-{
-
- .posts-category
- {
-
- display:none
- }
-
-
-}
-
-
-
-
-