site/public/blog/site/index.html

78 lines
4.0 KiB
HTML

<!DOCTYPE html>
<html lang="en"><link rel="alternate" type="text/gemini" href="gemini://mossfet.xyz/blog/site/index.gmi" title="Mossfet's site" />
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
<body>
<div style="margin: 2%"><header>
<nav class="navbar">
<a href="/index.xml"><img src="/images/feed.svg" style="height: 20px; width: 20px; float: left;" alt="RSS Feed"></a>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/links">Links</a></li>
<li><a href="https://git.solarpunk.moe/mossfet.site">Source</a></li>
</ul>
</nav>
</header>
<section class="section border">
<nav class="ring">
<div class="ring-prev">
</div>
<div class="ring-next">
<a href="https://mossfet.xyz/blog/metaballs/">Next post - Metaballs</a>
</div>
</nav>
<hr>
<article>
<div class="blog-header">
<h1 class="blog-title">I made a website</h1>
<h5>Written May 17, 2022</h5>
<h5>Last modifed May 21, 2022</h5>
<h5>Written by Mossfet</h5>
</div>
<div class="blog-content">
<p><em><strong>Note: This is outdated. I have rewritten the site with Hugo, and the solution described here was never hosted</strong></em></p>
<p>I made a website! And a blog! It remains to be seen how much I&rsquo;ll use it, but I&rsquo;ll at least make a post on how I made it</p>
<p>The site uses a very convoluted static site generator I wrote with makefiles and pandoc, the source of which can be found in the header of my website, along with that of the rest of this site (not that I would recommend using it. This was a very stupid idea kept going by sunk cost and pride). While the site&rsquo;s main pages are currently written in HTML and inserted into a template with pandoc (I may explore rewriting the main contents of the site in markdown), the blog posts are written in markdown and also converted using pandoc. Commonly shared elements like headers and footers are done with Pandoc templates.</p>
<p>I had initially used markdown instead of pandoc to convert the blog pages to HTML, and used Perl&rsquo;s regular expressions to find-and-replace markers I had placed in templates with content, but frankly this was a stupid idea.</p>
<p>The backend is written in Rust, with <a href="https://rocket.rs">rocket.rs</a>. I didn&rsquo;t particularly have the need for performance that Rust provides, but I like Rust and I like the way that Rocket works. It&rsquo;s a very simple implementation, with routes for the index, 404 page, and anything in the static/web/ and static/atom/ directories.</p>
<p>I eventually plan to add Gemini support as well, with rewrites of the main pages and the same blog posts being converted to Gemtext as well at HTML, but this will take some additional work as it is not supported in Pandoc.</p>
<p>The blog pages are also made into an Atom feed, also generated with pandoc.</p>
</div>
</article>
<hr>
<nav class="ring">
<div class="ring-prev">
</div>
<div class="ring-next">
<a href="https://mossfet.xyz/blog/metaballs/">Next post - Metaballs</a>
</div>
</nav>
</section>
<footer class="footer">
<div>
This site (frontend and backend) is licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPLv3</a> or later, with images and text also available under the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">CC-BY-SA 4.0</a>, at your discretion.
</div>
<hr>
<div class="webring"><a href="https://fediring.net/previous?host=mossfet.xyz" title="Previous Webring site">Previous</a> <a href="https://fediring.net">Fediring</a> <a href="https://fediring.net/next?host=mossfet.xyz" title="Next webring site">Next</a></div>
</footer>
</div>
</body>
</html>