add favicon

add humans.txt and robots.txt
generate sitemap
generate atom feed
This commit is contained in:
prx 2021-09-29 15:00:26 +02:00
parent 71058adae9
commit 6ee5c108d6
10 changed files with 87 additions and 0 deletions

View File

@ -1,6 +1,9 @@
generate-site:
ls | grep issue- | sort -n | xargs ./make_issue.sh
./make_issue.sh _index ../public/index.html
./sitemap.sh webzine.puffy.cafe ../public/ > ../public/sitemap.xml
gzip -9 -c ../public/sitemap.xml > ../public/sitemap.gz
./atom.sh webzine.puffy.cafe ../public/ > ../public/atom.xml
all: generate-site

View File

@ -2,6 +2,9 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>OpenBSD_WEBZINE_ISSUE #__ISSUE__</title>
<style>

43
issues/atom.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
set -e
domain="$1"
cd "$2"
feed_updated=$(date +%Y-%m-%dT%TZ)
cat <<EOF
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://${domain}/log/</id>
<title>OpenBSD Webzine</title>
<icon>https://${domain}/favicon.png</icon>
<link rel="alternate" type="text/html" href="https://${domain}/" />
<link rel="self" type="application/atom+xml" href="https://${domain}/atom.xml" />
<author><name>OpenBSD Webzine contributors</name></author>
<updated>${feed_updated}</updated>
EOF
for page in *.html; do
updated="$(date -ur $(stat -f %m ${page}) +%Y-%m-%dT%TZ)"
title="${page%-.*}"
tag="$(echo -n ${page} | sha256)"
cat <<EOF
<entry>
<title type="text">${title}</title>
<id>tag:${domain},2021:${tag}</id>
<updated>${updated}</updated>
<link rel="alternate" type="text/html" href="https://${domain}/${page}" />
<content type="html">
<![CDATA[
$(cat $page)
]]>
</content>
</entry>
EOF
done
echo "</feed>"
exit

21
issues/sitemap.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
ndd="$1"
printf '%s\n' \
'<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
cd "$2"
find . -name \*.html | while read -r l
do
link="$(printf "%s" ${l} | cut -d'/' -f2-)"
printf '<url><loc>%s</loc><lastmod>%s</lastmod></url>\n' \
"https://${ndd}/${link}"\
"$(date -r $(stat -f %m ${l}) +%Y-%m-%d)"
done
printf '%s' '</urlset>'

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
public/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

BIN
public/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

13
public/humans.txt Normal file
View File

@ -0,0 +1,13 @@
/* SITE */
Site name : OpenBSD Webzine
Site url : https://webzine.puffy.cafe
Built with (CMS) : coffee, tea and love
Created on : 2021
Language : English
Hosted by : prx's house
/* AUTHORS */
See contributors on https://tildegit.org/solene/openbsd-webzine
/* LINKS */
Follow (ATOM) : https://webzine.puffy.cafe/atom.xml

4
public/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-agent: *
Disallow:
Crawl-delay: 2
Sitemap: https://webzine.puffy.cafe/sitemap.gz