diff options
author | bt <bt@btxx.org> | 2024-06-08 13:22:19 -0400 |
---|---|---|
committer | bt <bt@btxx.org> | 2024-06-08 13:22:19 -0400 |
commit | dcfb172704f3afb68a30425029ec834be2883274 (patch) | |
tree | 02ac480745db802d7af03f3213a0c568322170e3 /build/phpetite | |
parent | e146f8a64c793c337999ce316b16ebe5fe6f2dab (diff) |
More content porting, on-going markdown changes for lowdown support
Diffstat (limited to 'build/phpetite')
-rw-r--r-- | build/phpetite/index.html | 90 |
1 files changed, 56 insertions, 34 deletions
diff --git a/build/phpetite/index.html b/build/phpetite/index.html index d735d7e..a5b53cd 100644 --- a/build/phpetite/index.html +++ b/build/phpetite/index.html @@ -1,62 +1,84 @@ <!doctype html> -<html lang="en" id="top"> +<html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="data:,"> <title>89 Blog Posts in a Single HTML File</title> - <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> - <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style> + <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" /> + <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" /> +<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style> </head> <nav> - <a href="#menu">Menu ↓</a> + <a href="#menu">Menu ↓</a> </nav> <main> -<h1>89 Blog Posts in a Single HTML File</h1> +<h1 id="89-blog-posts-in-a-single-html-file">89 Blog Posts in a Single HTML File</h1> + <p>2021-04-22</p> -<p><em>This is no longer the current setup of my blog</em>. I have switched back to Jekyll for performance reasons. I'll be leaving this post up as a point of reference though :)</p> -<hr /> -<p>This is my personal blog (if that wasn't already obvious). I currently have 89 blog posts living here. But I have done something magical today:</p> + +<p><em>This is no longer the current setup of my blog</em>. I have switched back to Jekyll for performance reasons. I’ll be leaving this post up as a point of reference though :)</p> + +<hr/> + +<p>This is my personal blog (if that wasn’t already obvious). I currently have 89 blog posts living here. But I have done something magical today:</p> + <p>All of these articles are rendered inside a <em>single HTML file</em>. 🤯</p> -<h2>What Sorcery is This?!</h2> -<p>No magic here - I'm just using my own personal static site generator called <a href="https://phpetite.org">PHPetite</a>. You can find all the code and more information about PHPetite on the <a href="https://github.com/bradleytaunt/phpetite">official Github repo page</a>. Please note that this project is still very much a WIP, so go easy on me when pointing out bugs or issues!</p> -<h2>Pingdom Stats</h2> -<p>Before we get into more details on how everything is built, let's take a quick look at some of my website stats (not that pure numbers are 100% accurate of user experience):</p> + +<h2 id="what-sorcery-is-this">What Sorcery is This?!</h2> + +<p>No magic here - I’m just using my own personal static site generator called <a href="https://phpetite.org">PHPetite</a>. You can find all the code and more information about PHPetite on the <a href="https://github.com/bradleytaunt/phpetite">official Github repo page</a>. Please note that this project is still very much a WIP, so go easy on me when pointing out bugs or issues!</p> + +<h2 id="pingdom-stats">Pingdom Stats</h2> + +<p>Before we get into more details on how everything is built, let’s take a quick look at some of my website stats (not that pure numbers are 100% accurate of user experience):</p> + <ul> <li>99 Performance Grade</li> <li>951 ms Load Time</li> <li>231.3 KB Page Size (thank you Netlify compression!)</li> </ul> + <p><a href="https://tools.pingdom.com/#5e169d6a82000000">See all the Pingdom details for yourself</a></p> + <p>Now the <code>Page Size</code> will certainly change as more blog posts are added over time, but if the total webpage size is roughly 230 KB with 89 blog posts, I figure that gives me the ability to add another 200 or so posts before I cross the <a href="https://1mb.club">1MB threshold</a></p> -<p>I'll deal with how to load in the content more efficiently when that times comes...</p> -<h2>What About Images?</h2> -<p>Good question. Since a large portion of my articles tend to be focused on design and CSS, visual examples are somewhat important. So how do I avoid loading in all the individual images on every single post into this single HTML "website"?</p> -<p>Easy - I don't load any images at all.</p> + +<p>I’ll deal with how to load in the content more efficiently when that times comes…</p> + +<h2 id="what-about-images">What About Images?</h2> + +<p>Good question. Since a large portion of my articles tend to be focused on design and CSS, visual examples are somewhat important. So how do I avoid loading in all the individual images on every single post into this single HTML “website”?</p> + +<p>Easy - I don’t load any images at all.</p> + <p>I now simply set any images that are not included in the current, visible <code>section</code> to <code>display: none</code>. This avoids breaking things with the RSS feed.</p> + <p>Here is an image example of an old Dribbble shot I created years ago:</p> -<p><figure> -<div class="img-parent"> -<img loading="lazy" src="/placeholder-image.webp" onclick="this.src='/public/images/aqua-ui-css-buttons.webp'" alt="Aqua UI buttons"> -</div> -<figcaption><b>Click the placeholder to load in the real image</b><br>Example Dribbble shot for testing. Feel free to click the default image in order to load the correct Dribbble source. <a href="/public/images/aqua-ui-css-buttons.webp">View full size image</a>.</figcaption> -</figure></p> -<p>I have noticed that Safari / Firefox on iOS renders the imagery as broken image links - I plan to look into this further to avoid that confusion. For now it works well on desktop Chromium and Firefox.</p> -<pre><code><figure> - <div class="img-parent"> - <img loading="lazy" src="/placeholder-image.webp" onclick="this.src='https://res.cloudinary.com/bradtaunt/image/fetch/q_auto:low/v1570124593/https://uglyduck.ca/public/images/aqua-ui-css-buttons.webp'" alt="Aqua UI buttons"> - </div> - <figcaption><b>Click the placeholder to load in the real image</b><br>Example Dribbble shot for testing. Feel free to click the default image in order to load the correct Dribbble source. <a href="https://res.cloudinary.com/bradtaunt/image/fetch/q_auto:low/v1570124593/https://uglyduck.ca/public/images/aqua-ui-css-buttons.webp">View full size image</a>.</figcaption> -</figure> + +<p>I have noticed that Safari / Firefox on iOS renders the imagery as broken image links - I plan to look into this further to avoid that confusion. For now it works well on desktop Chromium and Firefox.</p> + +<pre><code><figure> + <div class="img-parent"> + <img loading="lazy" src="/placeholder-image.webp" onclick="this.src='https://res.cloudinary.com/bradtaunt/image/fetch/q_auto:low/v1570124593/https://uglyduck.ca/public/images/aqua-ui-css-buttons.webp'" alt="Aqua UI buttons"> + </div> + <figcaption><b>Click the placeholder to load in the real image</b><br>Example Dribbble shot for testing. Feel free to click the default image in order to load the correct Dribbble source. <a href="https://res.cloudinary.com/bradtaunt/image/fetch/q_auto:low/v1570124593/https://uglyduck.ca/public/images/aqua-ui-css-buttons.webp">View full size image</a>.</figcaption> +</figure> </code></pre> -<h2>How's the SEO?</h2> -<p>Probably terrible to be honest. One single file for all blog posts is something Google will most likely frown upon. Whatever - it's my personal blog so I don't really give a shit.</p> -<h2>RSS Feed</h2> -<p>If you recently added my old RSS feed, I'm sorry, but you'll have to update. The new feed is located at <a href="https://tdarb.org/feeds/posts.xml">tdarb.org/feeds/posts.xml</a>. I made this change to avoid spamming the current feed users.</p> -<h2>Tasty Dog Food</h2> + +<h2 id="hows-the-seo">How’s the SEO?</h2> + +<p>Probably terrible to be honest. One single file for all blog posts is something Google will most likely frown upon. Whatever - it’s my personal blog so I don’t really give a shit.</p> + +<h2 id="rss-feed">RSS Feed</h2> + +<p>If you recently added my old RSS feed, I’m sorry, but you’ll have to update. The new feed is located at <a href="https://tdarb.org/feeds/posts.xml">tdarb.org/feeds/posts.xml</a>. I made this change to avoid spamming the current feed users.</p> + +<h2 id="tasty-dog-food">Tasty Dog Food</h2> + <p>At the end of the day, by moving my personal blog over to PHPetite, it makes me more aware of current bugs and restrictions within the project. I feel like this will help me to improve this static site generator even more over time, instead of letting it die a slow death ignored on Github.</p> + <p>I hope you enjoyed this little breakdown and maybe even want to try out PHPetite for yourself? 😉</p> <footer role="contentinfo"> <h2>Menu Navigation</h2> |