blog/_output/blog/default-styles.html

71 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>New Default Styling and 2x Faster!</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="../style.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Content placed here will appear directly after the opening <body> tag -->
<nav>
<a href="/">Home</a><span>&nbsp;/&nbsp;</span>
<a href="/blog">Blog</a><span>&nbsp;/&nbsp;</span>
<a href="/tweaks.html">Tweaks</a><span>&nbsp;/&nbsp;</span>
<a href="https://codeberg.org/tdarb/pblog">Download</a>
</nav>
<!-- Do not remove this opening article element -->
<article>
<header id="title-block-header">
<h1 class="title">New Default Styling and 2x Faster!</h1>
<p class="date">Wed, 27 Jul 2022</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#the-default-theme" id="toc-the-default-theme">The Default &#x201C;Theme&#x201D;</a></li>
<li><a href="#new-config-setup" id="toc-new-config-setup">New Config Setup</a></li>
<li><a href="#cutting-the-build-time-in-half" id="toc-cutting-the-build-time-in-half">Cutting the Build Time in Half</a></li>
<li><a href="#far-from-perfect" id="toc-far-from-perfect">Far From Perfect</a></li>
</ul>
</nav>
<p>If it wasn&#x2019;t already obvious, this project has received a minor styling overhaul. But looks weren&#x2019;t the only thing updated with this latest patch.</p>
<p>The total build process time is now <em>two times faster</em>!</p>
<p>Keep reading for more details.</p>
<h2 id="the-default-theme">The Default &#x201C;Theme&#x201D;</h2>
<p>The styling changes aren&#x2019;t anything ground breaking. They simply center the main content and add a little more visual separation of the content and backdrop. Again, you can customize <code>pblog</code> as you see fit, but having a sane default is always nice.</p>
<h2 id="new-config-setup">New Config Setup</h2>
<p>Since updates and performance fixes might continue to come through in the future, I didn&#x2019;t want to make users play around with their default configuration every single time. Now, all main configuration is handled in the new <code>_config.sh</code> file.</p>
<p>Feels cleaner already, right?</p>
<h2 id="cutting-the-build-time-in-half">Cutting the Build Time in Half</h2>
<p>I must give big kudos to <a href="https://matthewgraybosch.com">Matthew Graybosch</a> for inspiring this pretty big improvement. After some discussion over emails we both agreed that it seemed overkill to render the blog content twice (once for the XML feed itself and then again for all posts listed under <code>blog</code>). Performance wasn&#x2019;t the initial goal when I first launched this project, but now that the dust has settled it seemed appropriate to go back and fix some things.</p>
<p><code>pblog</code> now only needs to render the blog posts found in the <code>posts</code> directory <em>once</em>. It still produces semantic XML and keeps the webview versions of the articles looking solid. Overall I&#x2019;m pretty happy with this <em>little</em> improvement - it should pretty noticeable on projects rendering many posts.</p>
<h2 id="far-from-perfect">Far From Perfect</h2>
<p>This project is still very much in it&#x2019;s infancy. So if you notice something odd or broken in your own testing, please don&#x2019;t hesitate to open a patch or simply bring up the issue!</p>
<p>Thanks for reading,</p>
<p>&#x2013; Brad</p>
</article><!-- Do not remove this closing article element -->
<!-- Content placed here will appear directly before the closing </body> tag -->
<footer>
<br>
<hr>
<p><small>Powered by <a href="https://pblog.xyz">pblog</a><br>
Made with &hearts; for a simpler web.<br>
Peanut butter sandwich illustration by Kate Maldjian from NounProject.com</small></p>
</footer>
</body>
</html>