import posts
This commit is contained in:
parent
0d97573aa1
commit
9812cc3613
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
+++
|
||||||
|
date = '2024-11-13T14:24:21+01:00'
|
||||||
|
draft = true
|
||||||
|
title = 'Hard Problem: Invalidating the browser cache'
|
||||||
|
+++
|
||||||
|
|
||||||
|
**I had a bit of an issue with my [website](https://demos.ajstepien.xyz) recently.**
|
||||||
|
|
||||||
|
I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they *were* styled when I loaded the same page in Chrome.
|
||||||
|
|
||||||
|
The experienced computer touchers amongst you will be saying "this is obviously a cache problem", and you're right, it is obviously a cache problem. Pressing `CTR + SHIFT + R` (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people's machines?
|
||||||
|
|
||||||
|
## Invalidating cached HTML
|
||||||
|
|
||||||
|
The best way to deal with this problem is to tell the browser not to cache our HTML in the first place. We can achieve this by adding the following meta tag to `index.html`, and any other HTML files we don't want cached.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<meta http-equiv="pragma" content="no-cache" />
|
||||||
|
```
|
||||||
|
|
||||||
|
## Invalidating cached CSS
|
||||||
|
|
||||||
|
A quick google search revealed that the best way to invalidate browser cache is by changing the url of the file you're telling it to load. So we would change this:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<link rel="stylesheet" href="css/defaults.css" />
|
||||||
|
```
|
||||||
|
|
||||||
|
to this:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<link rel="stylesheet" href="css/defaults-2.css" />
|
||||||
|
```
|
||||||
|
|
||||||
|
and the browser would recognize this as new file and load it from the server. Problem solved! Of course, you would have to change the file name too...
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mv css/defaults.css css/defaults-2.css
|
||||||
|
```
|
||||||
|
|
||||||
|
... and this would get tedious very quickly. Furthermore, it's going to make a mess of your version history if, as far as Git is concerned, you're deleting the CSS file and writing a new one with every deployment. Surely there's a better way?
|
||||||
|
|
||||||
|
### Using a query
|
||||||
|
|
||||||
|
Of course there is. Look at this:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<link rel="stylesheet" href="css/defaults.css?v=2"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
As we're requesting the file via http, we can append a query. Awesome. Not awesome enough though. I'm too lazy to do this every time I push a commit, and, being human, I'll probably forget at a critical moment. This can only mean one thing. It's time to bash (🤣) out a quick build script!
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
COMMIT="$(git rev-parse HEAD)"
|
||||||
|
sed -i "s/css?=\w*/css?v=${COMMIT}/g" index.html
|
||||||
|
```
|
||||||
|
|
||||||
|
Let's talk real quick about what's happening here:
|
||||||
|
|
||||||
|
`COMMIT="$(git rev-parse HEAD)"` gets the commit id from Git and assigns it the variable `$COMMIT`.
|
||||||
|
|
||||||
|
Then, `sed -i "s/css?=\w*/css?v=${COMMIT}/g" index.html` does a find and replace on `index.html`. The regular expression `css?=\w*` matches 'css?=' plus any number of contiguous alphanumeric characters (everything until the next quote mark, basically) before replacing these alphanumeric characters with the commit id. The flag `-i` tells sed to edit the file in place. The `g` tells it to perform the operation on the whole file.
|
||||||
|
|
||||||
|
Now, whenever we push a new commit, any CSS imports in `index.html` will be changed to something like this:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<link rel="stylesheet" href="css/styles.css?v=ab10c24280844c10c10c1adfb8b85b03b316f72b" />
|
||||||
|
```
|
||||||
|
|
||||||
|
Pretty neat, huh?
|
||||||
|
|
||||||
|
There's just one thing bugging me: surely I do actually want the CSS to be cached *sometimes*. Caching exists for a reason, and I don't want to sacrifice performance. Maybe I can modify the build script so that it only updates the CSS imports when the CSS files have changed... Sounds like a topic for another blogpost!
|
|
@ -0,0 +1,37 @@
|
||||||
|
+++
|
||||||
|
date = '2024-11-13T11:53:13+01:00'
|
||||||
|
draft = false
|
||||||
|
title = 'Permissions Strike Again'
|
||||||
|
+++
|
||||||
|
|
||||||
|
# It's always permissions
|
||||||
|
|
||||||
|
Configuring Apache really isn't rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it's one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.
|
||||||
|
|
||||||
|
**And it almost always has to do with permissions.**
|
||||||
|
|
||||||
|
So, I'm writing this post both as a means of christening this devlog ([Hi! I'm Andrzej! Hire me!](https://demos.ajstepien.xyz)) and also as a reminder to myself that *the home folder is not executable by default.*
|
||||||
|
|
||||||
|
Please, Andrzej. Please. The next time you're building a website, be it for a client or for yourself, and you find yourself scratching your head, wondering what error you may have made in the `.confs`, checking the permissions of your symlink again and again, ask yourself: is my symlink pointing to a directory in the home folder? Because Apache can't open the home folder until you change the permissions!
|
||||||
|
|
||||||
|
## What?
|
||||||
|
|
||||||
|
In Linux we open directories by 'executing' them. A directory is an executable that lists part of file-system for us, basically. Now, by default, the home directory is only executable by its owner. This makes sense when you think about it -- you don't want your sister, or co-worker, or (more likely) whatever barely-audited application you're installing today, to be able to open that directory. But you probably do want your webserver to be able to open it, especially if you are symlinking to it from `/var/www`.
|
||||||
|
|
||||||
|
[Hugo](https://gohugo.io/) (the framework I'm using to build this blog) likes to deploy to the home directory by default. In fact there are lots of reasons why you'd want to deploy there. I do this exact same thing with [Jenkins](https://jenkins.io), and I wasted an hour troubleshooting this exact same problem when I set up that server too.
|
||||||
|
|
||||||
|
So, Andrzej of the future (did anyone non-ghoulish win an election yet?), for future reference, let's say you're deploying to `/home/devlog/website`:
|
||||||
|
|
||||||
|
1. Add Apache to the 'devlog' user group.
|
||||||
|
```
|
||||||
|
sudo usermod -aG devlog www-data
|
||||||
|
```
|
||||||
|
2. Change the permissions on /home/devlog to allow group members to open it.
|
||||||
|
```
|
||||||
|
sudo chmod 710 /home/devlog
|
||||||
|
```
|
||||||
|
|
||||||
|
IT'S THAT EASY.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Categories | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Categories</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Categories on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/categories/</link>
|
||||||
|
<description>Recent content in Categories on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,22 @@
|
||||||
|
body {
|
||||||
|
color: #222;
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 1rem;
|
||||||
|
max-width: 768px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid #222;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #00e;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,71 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content="Hugo 0.138.0"><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a aria-current="page" class="active" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<p>Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
|
||||||
|
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
|
||||||
|
excepteur excepteur pariatur nostrud qui irure ullamco.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/posts/hard-problem/">Hard Problem: Invalidating the browser cache</a></h2>
|
||||||
|
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
|
||||||
|
<p>I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
|
||||||
|
<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people’s machines?</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/permissions-strike-again/">Permissions Strike Again</a></h2>
|
||||||
|
<h1 id="its-always-permissions">It’s always permissions</h1>
|
||||||
|
<p>Configuring Apache really isn’t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it’s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
|
||||||
|
<p><strong>And it almost always has to do with permissions.</strong></p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-3/">Post 3</a></h2>
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-2/">Post 2</a></h2>
|
||||||
|
<p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
|
||||||
|
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-1/">Post 1</a></h2>
|
||||||
|
<p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
|
||||||
|
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Home on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/</link>
|
||||||
|
<description>Recent content in Home on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Hard Problem: Invalidating the browser cache</title>
|
||||||
|
<link>http://localhost:1313/posts/hard-problem/</link>
|
||||||
|
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/hard-problem/</guid>
|
||||||
|
<description><p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people&rsquo;s machines?</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Permissions Strike Again</title>
|
||||||
|
<link>http://localhost:1313/posts/permissions-strike-again/</link>
|
||||||
|
<pubDate>Wed, 13 Nov 2024 11:53:13 +0100</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/permissions-strike-again/</guid>
|
||||||
|
<description><h1 id="its-always-permissions">It&rsquo;s always permissions</h1>
<p>Configuring Apache really isn&rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
<p><strong>And it almost always has to do with permissions.</strong></p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 3</title>
|
||||||
|
<link>http://localhost:1313/posts/post-3/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-3/</guid>
|
||||||
|
<description><p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 2</title>
|
||||||
|
<link>http://localhost:1313/posts/post-2/</link>
|
||||||
|
<pubDate>Wed, 15 Feb 2023 10:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-2/</guid>
|
||||||
|
<description><p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 1</title>
|
||||||
|
<link>http://localhost:1313/posts/post-1/</link>
|
||||||
|
<pubDate>Sun, 15 Jan 2023 09:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-1/</guid>
|
||||||
|
<description><p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,4 @@
|
||||||
|
(() => {
|
||||||
|
// <stdin>
|
||||||
|
console.log("This site was generated by Hugo.");
|
||||||
|
})();
|
|
@ -0,0 +1,81 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Hard Problem: Invalidating the browser cache | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Hard Problem: Invalidating the browser cache</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<time datetime="2024-11-13T14:24:21+01:00">November 13, 2024</time>
|
||||||
|
|
||||||
|
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
|
||||||
|
<p>I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
|
||||||
|
<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people’s machines?</p>
|
||||||
|
<h2 id="invalidating-cached-html">Invalidating cached HTML</h2>
|
||||||
|
<p>The best way to deal with this problem is to tell the browser not to cache our HTML in the first place. We can achieve this by adding the following meta tag to <code>index.html</code>, and any other HTML files we don’t want cached.</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span> <<span style="color:#f92672">meta</span> <span style="color:#a6e22e">http-equiv</span><span style="color:#f92672">=</span><span style="color:#e6db74">"pragma"</span> <span style="color:#a6e22e">content</span><span style="color:#f92672">=</span><span style="color:#e6db74">"no-cache"</span> />
|
||||||
|
</span></span></code></pre></div><h2 id="invalidating-cached-css">Invalidating cached CSS</h2>
|
||||||
|
<p>A quick google search revealed that the best way to invalidate browser cache is by changing the url of the file you’re telling it to load. So we would change this:</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><<span style="color:#f92672">link</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">"stylesheet"</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">"css/defaults.css"</span> />
|
||||||
|
</span></span></code></pre></div><p>to this:</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><<span style="color:#f92672">link</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">"stylesheet"</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">"css/defaults-2.css"</span> />
|
||||||
|
</span></span></code></pre></div><p>and the browser would recognize this as new file and load it from the server. Problem solved! Of course, you would have to change the file name too…</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mv css/defaults.css css/defaults-2.css
|
||||||
|
</span></span></code></pre></div><p>… and this would get tedious very quickly. Furthermore, it’s going to make a mess of your version history if, as far as Git is concerned, you’re deleting the CSS file and writing a new one with every deployment. Surely there’s a better way?</p>
|
||||||
|
<h3 id="using-a-query">Using a query</h3>
|
||||||
|
<p>Of course there is. Look at this:</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><<span style="color:#f92672">link</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">"stylesheet"</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">"css/defaults.css?v=2"</span>/>
|
||||||
|
</span></span></code></pre></div><p>As we’re requesting the file via http, we can append a query. Awesome. Not awesome enough though. I’m too lazy to do this every time I push a commit, and, being human, I’ll probably forget at a critical moment. This can only mean one thing. It’s time to bash (🤣) out a quick build script!</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/usr/bin/env bash
|
||||||
|
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>COMMIT<span style="color:#f92672">=</span><span style="color:#e6db74">"</span><span style="color:#66d9ef">$(</span>git rev-parse HEAD<span style="color:#66d9ef">)</span><span style="color:#e6db74">"</span>
|
||||||
|
</span></span><span style="display:flex;"><span>sed -i <span style="color:#e6db74">"s/css?=\w*/css?v=</span><span style="color:#e6db74">${</span>COMMIT<span style="color:#e6db74">}</span><span style="color:#e6db74">/g"</span> index.html
|
||||||
|
</span></span></code></pre></div><p>Let’s talk real quick about what’s happening here:</p>
|
||||||
|
<p><code>COMMIT="$(git rev-parse HEAD)"</code> gets the commit id from Git and assigns it the variable <code>$COMMIT</code>.</p>
|
||||||
|
<p>Then, <code>sed -i "s/css?=\w*/css?v=${COMMIT}/g" index.html</code> does a find and replace on <code>index.html</code>. The regular expression <code>css?=\w*</code> matches ‘css?=’ plus any number of contiguous alphanumeric characters (everything until the next quote mark, basically) before replacing these alphanumeric characters with the commit id. The flag <code>-i</code> tells sed to edit the file in place. The <code>g</code> tells it to perform the operation on the whole file.</p>
|
||||||
|
<p>Now, whenever we push a new commit, any CSS imports in <code>index.html</code> will be changed to something like this:</p>
|
||||||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-html" data-lang="html"><span style="display:flex;"><span><<span style="color:#f92672">link</span> <span style="color:#a6e22e">rel</span><span style="color:#f92672">=</span><span style="color:#e6db74">"stylesheet"</span> <span style="color:#a6e22e">href</span><span style="color:#f92672">=</span><span style="color:#e6db74">"css/styles.css?v=ab10c24280844c10c10c1adfb8b85b03b316f72b"</span> />
|
||||||
|
</span></span></code></pre></div><p>Pretty neat, huh?</p>
|
||||||
|
<p>There’s just one thing bugging me: surely I do actually want the CSS to be cached <em>sometimes</em>. Caching exists for a reason, and I don’t want to sacrifice performance. Maybe I can modify the build script so that it only updates the CSS imports when the CSS files have changed… Sounds like a topic for another blogpost!</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,69 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Posts | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="page" class="active" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Posts</h1>
|
||||||
|
<p>Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/posts/hard-problem/">Hard Problem: Invalidating the browser cache</a></h2>
|
||||||
|
<p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
|
||||||
|
<p>I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
|
||||||
|
<p>The experienced computer touchers amongst you will be saying “this is obviously a cache problem”, and you’re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people’s machines?</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/permissions-strike-again/">Permissions Strike Again</a></h2>
|
||||||
|
<h1 id="its-always-permissions">It’s always permissions</h1>
|
||||||
|
<p>Configuring Apache really isn’t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it’s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
|
||||||
|
<p><strong>And it almost always has to do with permissions.</strong></p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-3/">Post 3</a></h2>
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-2/">Post 2</a></h2>
|
||||||
|
<p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
|
||||||
|
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-1/">Post 1</a></h2>
|
||||||
|
<p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
|
||||||
|
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Posts on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/posts/</link>
|
||||||
|
<description>Recent content in Posts on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 13 Nov 2024 14:24:21 +0100</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/posts/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Hard Problem: Invalidating the browser cache</title>
|
||||||
|
<link>http://localhost:1313/posts/hard-problem/</link>
|
||||||
|
<pubDate>Wed, 13 Nov 2024 14:24:21 +0100</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/hard-problem/</guid>
|
||||||
|
<description><p><strong>I had a bit of an issue with my <a href="https://demos.ajstepien.xyz">website</a> recently.</strong></p>
<p>I pushed some changes incorporating images for the first time (I know, very swish), and everything seemed to be working just fine, but when I loaded the production site in Firefox, the images were not styled. Stranger still, they <em>were</em> styled when I loaded the same page in Chrome.</p>
<p>The experienced computer touchers amongst you will be saying &ldquo;this is obviously a cache problem&rdquo;, and you&rsquo;re right, it is obviously a cache problem. Pressing <code>CTR + SHIFT + R</code> (which forces Firefox to clear the cache and do a full reload) proved this thesis, and solved the problem handily for me, on my machine. But what about other people&rsquo;s machines?</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Permissions Strike Again</title>
|
||||||
|
<link>http://localhost:1313/posts/permissions-strike-again/</link>
|
||||||
|
<pubDate>Wed, 13 Nov 2024 11:53:13 +0100</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/permissions-strike-again/</guid>
|
||||||
|
<description><h1 id="its-always-permissions">It&rsquo;s always permissions</h1>
<p>Configuring Apache really isn&rsquo;t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it&rsquo;s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
<p><strong>And it almost always has to do with permissions.</strong></p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 3</title>
|
||||||
|
<link>http://localhost:1313/posts/post-3/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-3/</guid>
|
||||||
|
<description><p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 2</title>
|
||||||
|
<link>http://localhost:1313/posts/post-2/</link>
|
||||||
|
<pubDate>Wed, 15 Feb 2023 10:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-2/</guid>
|
||||||
|
<description><p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 1</title>
|
||||||
|
<link>http://localhost:1313/posts/post-1/</link>
|
||||||
|
<pubDate>Sun, 15 Jan 2023 09:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-1/</guid>
|
||||||
|
<description><p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Permissions Strike Again | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Permissions Strike Again</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<time datetime="2024-11-13T11:53:13+01:00">November 13, 2024</time>
|
||||||
|
|
||||||
|
<h1 id="its-always-permissions">It’s always permissions</h1>
|
||||||
|
<p>Configuring Apache really isn’t rocket science. There are a wealth of great tutorials online, the documentation is very well documented, and the defaults work more or less out of the box. But it’s one of those jobs that I do just infrequently enough that I always forget things in the interim, and end up making the same old mistakes.</p>
|
||||||
|
<p><strong>And it almost always has to do with permissions.</strong></p>
|
||||||
|
<p>So, I’m writing this post both as a means of christening this devlog (<a href="https://demos.ajstepien.xyz">Hi! I’m Andrzej! Hire me!</a>) and also as a reminder to myself that <em>the home folder is not executable by default.</em></p>
|
||||||
|
<p>Please, Andrzej. Please. The next time you’re building a website, be it for a client or for yourself, and you find yourself scratching your head, wondering what error you may have made in the <code>.confs</code>, checking the permissions of your symlink again and again, ask yourself: is my symlink pointing to a directory in the home folder? Because Apache can’t open the home folder until you change the permissions!</p>
|
||||||
|
<h2 id="what">What?</h2>
|
||||||
|
<p>In Linux we open directories by ’executing’ them. A directory is an executable that lists part of file-system for us, basically. Now, by default, the home directory is only executable by its owner. This makes sense when you think about it – you don’t want your sister, or co-worker, or (more likely) whatever barely-audited application you’re installing today, to be able to open that directory. But you probably do want your webserver to be able to open it, especially if you are symlinking to it from <code>/var/www</code>.</p>
|
||||||
|
<p><a href="https://gohugo.io/">Hugo</a> (the framework I’m using to build this blog) likes to deploy to the home directory by default. In fact there are lots of reasons why you’d want to deploy there. I do this exact same thing with <a href="https://jenkins.io">Jenkins</a>, and I wasted an hour troubleshooting this exact same problem when I set up that server too.</p>
|
||||||
|
<p>So, Andrzej of the future (did anyone non-ghoulish win an election yet?), for future reference, let’s say you’re deploying to <code>/home/devlog/website</code>:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Add Apache to the ‘devlog’ user group.</li>
|
||||||
|
</ol>
|
||||||
|
<pre tabindex="0"><code>sudo usermod -aG devlog www-data
|
||||||
|
</code></pre><ol start="2">
|
||||||
|
<li>Change the permissions on /home/devlog to allow group members to open it.</li>
|
||||||
|
</ol>
|
||||||
|
<pre tabindex="0"><code>sudo chmod 710 /home/devlog
|
||||||
|
</code></pre><p>IT’S THAT EASY.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,61 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Post 1 | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Post 1</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<time datetime="2023-01-15T09:00:00-07:00">January 15, 2023</time>
|
||||||
|
|
||||||
|
<p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
|
||||||
|
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>Tags:</div>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/tags/red/">Red</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Post 2 | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Post 2</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<time datetime="2023-02-15T10:00:00-07:00">February 15, 2023</time>
|
||||||
|
|
||||||
|
<p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
|
||||||
|
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>Tags:</div>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/tags/red/">Red</a></li>
|
||||||
|
<li><a href="/tags/green/">Green</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -0,0 +1,64 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Post 3 | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="true" class="ancestor" href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Post 3</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<time datetime="2023-03-15T11:00:00-07:00">March 15, 2023</time>
|
||||||
|
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
<p><img src="bryce-canyon.jpg" alt="Bryce Canyon National Park"></p>
|
||||||
|
<p>Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div>Tags:</div>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/tags/red/">Red</a></li>
|
||||||
|
<li><a href="/tags/green/">Green</a></li>
|
||||||
|
<li><a href="/tags/blue/">Blue</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
|
<url>
|
||||||
|
<loc>http://localhost:1313/posts/hard-problem/</loc>
|
||||||
|
<lastmod>2024-11-13T14:24:21+01:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/posts/permissions-strike-again/</loc>
|
||||||
|
<lastmod>2024-11-13T11:53:13+01:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/tags/blue/</loc>
|
||||||
|
<lastmod>2023-03-15T11:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/tags/green/</loc>
|
||||||
|
<lastmod>2023-03-15T11:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/posts/post-3/</loc>
|
||||||
|
<lastmod>2023-03-15T11:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/tags/red/</loc>
|
||||||
|
<lastmod>2023-03-15T11:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/tags/</loc>
|
||||||
|
<lastmod>2023-03-15T11:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/posts/post-2/</loc>
|
||||||
|
<lastmod>2023-02-15T10:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/posts/post-1/</loc>
|
||||||
|
<lastmod>2023-01-15T09:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/posts/</loc>
|
||||||
|
<lastmod>2023-01-01T08:30:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/</loc>
|
||||||
|
<lastmod>2023-01-01T08:00:00-07:00</lastmod>
|
||||||
|
</url><url>
|
||||||
|
<loc>http://localhost:1313/categories/</loc>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Blue | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Blue</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-3/">Post 3</a></h2>
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Blue on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/tags/blue/</link>
|
||||||
|
<description>Recent content in Blue on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 15 Mar 2023 11:00:00 -0700</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/tags/blue/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Post 3</title>
|
||||||
|
<link>http://localhost:1313/posts/post-3/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-3/</guid>
|
||||||
|
<description><p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Green | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Green</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-3/">Post 3</a></h2>
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-2/">Post 2</a></h2>
|
||||||
|
<p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
|
||||||
|
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Green on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/tags/green/</link>
|
||||||
|
<description>Recent content in Green on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 15 Mar 2023 11:00:00 -0700</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/tags/green/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Post 3</title>
|
||||||
|
<link>http://localhost:1313/posts/post-3/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-3/</guid>
|
||||||
|
<description><p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 2</title>
|
||||||
|
<link>http://localhost:1313/posts/post-2/</link>
|
||||||
|
<pubDate>Wed, 15 Feb 2023 10:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-2/</guid>
|
||||||
|
<description><p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Tags | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a aria-current="page" class="active" href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Tags</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/tags/blue/">Blue</a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/tags/green/">Green</a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/tags/red/">Red</a></h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Tags on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/tags/</link>
|
||||||
|
<description>Recent content in Tags on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 15 Mar 2023 11:00:00 -0700</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/tags/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Blue</title>
|
||||||
|
<link>http://localhost:1313/tags/blue/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/tags/blue/</guid>
|
||||||
|
<description></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Green</title>
|
||||||
|
<link>http://localhost:1313/tags/green/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/tags/green/</guid>
|
||||||
|
<description></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Red</title>
|
||||||
|
<link>http://localhost:1313/tags/red/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/tags/red/</guid>
|
||||||
|
<description></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-us" dir="ltr">
|
||||||
|
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>Red | My New Hugo Site</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/main.css">
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My New Hugo Site</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/posts/">Posts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/tags/">Tags</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Red</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-3/">Post 3</a></h2>
|
||||||
|
<p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-2/">Post 2</a></h2>
|
||||||
|
<p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
|
||||||
|
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p>
|
||||||
|
|
||||||
|
<h2><a href="/posts/post-1/">Post 1</a></h2>
|
||||||
|
<p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
|
||||||
|
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<p>Copyright 2024. All rights reserved.</p>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>Red on My New Hugo Site</title>
|
||||||
|
<link>http://localhost:1313/tags/red/</link>
|
||||||
|
<description>Recent content in Red on My New Hugo Site</description>
|
||||||
|
<generator>Hugo</generator>
|
||||||
|
<language>en-us</language>
|
||||||
|
<lastBuildDate>Wed, 15 Mar 2023 11:00:00 -0700</lastBuildDate>
|
||||||
|
<atom:link href="http://localhost:1313/tags/red/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
<item>
|
||||||
|
<title>Post 3</title>
|
||||||
|
<link>http://localhost:1313/posts/post-3/</link>
|
||||||
|
<pubDate>Wed, 15 Mar 2023 11:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-3/</guid>
|
||||||
|
<description><p>Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 2</title>
|
||||||
|
<link>http://localhost:1313/posts/post-2/</link>
|
||||||
|
<pubDate>Wed, 15 Feb 2023 10:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-2/</guid>
|
||||||
|
<description><p>Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.</p>
<p>Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.</p></description>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Post 1</title>
|
||||||
|
<link>http://localhost:1313/posts/post-1/</link>
|
||||||
|
<pubDate>Sun, 15 Jan 2023 09:00:00 -0700</pubDate>
|
||||||
|
<guid>http://localhost:1313/posts/post-1/</guid>
|
||||||
|
<description><p>Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.</p>
<p>Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.</p></description>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
Loading…
Reference in New Issue