add favicon
add humans.txt and robots.txt generate sitemap generate atom feed
This commit is contained in:
parent
71058adae9
commit
6ee5c108d6
|
@ -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
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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>'
|
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 577 B |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
User-agent: *
|
||||
Disallow:
|
||||
Crawl-delay: 2
|
||||
Sitemap: https://webzine.puffy.cafe/sitemap.gz
|
Loading…
Reference in New Issue