Merge pull request 'fix-index' (#28) from hucste/openbsd-webzine:fix-index into main

Reviewed-on: #28
This commit is contained in:
solene 2021-10-04 16:39:13 +00:00
commit b7834e05c8
7 changed files with 36 additions and 23 deletions

View File

@ -1,8 +1,12 @@
<div id="title"><a href="https://webzine.puffy.cafe">OpenBSD Webzine</a></div>
<header>
<h1 id="title"><a href="https://webzine.puffy.cafe">OpenBSD Webzine</a></h1>
<div id="banner">
<span aria-hidden="true"></span>
<em>Your tasty dose of OpenBSD news</em>
<span aria-hidden="true"></span>
<p>
<span aria-hidden="true"></span>
<em>Your tasty dose of OpenBSD news</em>
<span aria-hidden="true"></span>
</p>
</div>
</header>
<main>
<section>

View File

@ -1,4 +1,6 @@
<article id="issues">
<h2>Issues published</h2>
<ul>
<li>Issue #1 <a class="permalink" href="issue-1.html">[html]</a></li>
</ul>
</article>

View File

@ -1,5 +1,7 @@
<article id="infos">
<h2>Infos</h2>
<div>
<p>This webzine is done by volunteers who are passionate about the OpenBSD project development.</p>
<p>Our goal is to allow people to stay informed about OpenBSD in a cool, fun and instructive way, like reading a regularly issued magazine of one's favorite hobby.</p>
</div>
</article>

View File

@ -1,14 +1,14 @@
<article id="community">
<h2>Community</h2>
<div>
<p>Looking to get in touch with OpenBSD users? Here are a few ways to join them.</p>
<ul>
<li><a class="permalink" href="atom.xml">Webzine feed</a></li>
<li><a class="permalink" href="https://www.openbsd.org/mail.html">Official OpenBSD mailing-lists</a></li>
<li>IRC: channel <code>#openbsd</code> on irc.libera.chat</li>
<li>XMPP: room <a class="permalink" href="xmpp:openbsd@chat.si3t.ch?join">openbsd@chat.si3t.ch</a></li>
<li>Reddit: <a class="permalink" href="https://www.reddit.com/r/openbsd/">Subreddit /r/openbsd/</a></li>
<li>Matrix: channel <code>#openbsd:matrix.org</code></li>
<li>Mastodon: Search for tag #OpenBSD</li>
<li>Twitter: <a class="permalink" href="https://twitter.com/hashtag/openbsd">#OpenBSD</a></li>
</ul>
</div>
<p>Looking to get in touch with OpenBSD users? Here are a few ways to join them.</p>
<ul>
<li><a class="permalink" href="atom.xml">Webzine feed</a></li>
<li><a class="permalink" href="https://www.openbsd.org/mail.html">Official OpenBSD mailing-lists</a></li>
<li>IRC: channel <code>#openbsd</code> on irc.libera.chat</li>
<li>XMPP: room <a class="permalink" href="xmpp:openbsd@chat.si3t.ch?join">openbsd@chat.si3t.ch</a></li>
<li>Reddit: <a class="permalink" href="https://www.reddit.com/r/openbsd/">Subreddit /r/openbsd/</a></li>
<li>Matrix: channel <code>#openbsd:matrix.org</code></li>
<li>Mastodon: Search for tag #OpenBSD</li>
<li>Twitter: <a class="permalink" href="https://twitter.com/hashtag/openbsd">#OpenBSD</a></li>
</ul>
</article>

View File

@ -1,4 +1,7 @@
<article id="contribute">
<h2>How to contribute</h2>
<div>
<p>If you want to contribute to the Webzine, from a simple contribution suggesting a link or a news to a large or regular contribution, we do all the work publicly with Git. <a class="permalink" href="https://tildegit.org/solene/openbsd-webzine/">Link to the Git repository.</a></p>
</div>
<p>
If you want to contribute to the Webzine, from a simple contribution suggesting a link or a news to a large or regular contribution, we do all the work publicly with Git.
<a class="permalink" href="https://tildegit.org/solene/openbsd-webzine/">Link to the Git repository.</a>
</p>
</article>

View File

@ -2,8 +2,8 @@
<h1 id="title"><a href="https://webzine.puffy.cafe">OpenBSD Webzine</a></h1>
<div id="banner">
<p>ISSUE #__ISSUE__</p>
<p><time datetime="__DATE__">__DATE__</time></p>
<p><time datetime="__DATETIME__">__HUMAN_DATE__</time></p>
</div>
</header>
<main>
<section>
<section>

View File

@ -49,13 +49,15 @@ then
sed -i "s/__TITLE__/issue #${issue}/g" $DESTFILENAME
sed -i "s/__FILENAME__/issue-${issue}.html/" $DESTFILENAME
# replace date
DATETIME="$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "${PUBLISHED_DATE}" +"%xT%XZ")" 2>/dev/null
HUMAN_DATE="$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "${PUBLISHED_DATE}" +"%B %e, %Y")" 2>/dev/null
if [ $? -ne 0 ]; then
echo "err: Please fill ${DIR}/metadata.sh with ISO-8601 valid date"
exit 1
else
sed -i "s/__DATE__/${HUMAN_DATE}/" $DESTFILENAME
sed -i "s/__DATETIME__/${DATETIME}/" $DESTFILENAME
sed -i "s/__HUMAN_DATE__/${HUMAN_DATE}/" $DESTFILENAME
fi
else
# index.html changes