Hard Problem: Invalidating the browser cache
+Hard Problem? Invalidating the browser cache
@@ -61,9 +61,11 @@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:
<link rel="stylesheet" href="css/styles.css?v=ab10c24280844c10c10c1adfb8b85b03b316f72b" />
+<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!
+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…
diff --git a/public/posts/index.html b/public/posts/index.html
index 31e9886..810a0c5 100644
--- a/public/posts/index.html
+++ b/public/posts/index.html
@@ -46,9 +46,9 @@
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?
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.
+ 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!) and also as a reminder to myself that the home folder is not executable by default.
Post 3
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.
diff --git a/public/posts/index.xml b/public/posts/index.xml
index 6a3d70c..8b751cf 100644
--- a/public/posts/index.xml
+++ b/public/posts/index.xml
@@ -20,7 +20,7 @@
http://localhost:1313/posts/permissions-strike-again/
Wed, 13 Nov 2024 11:53:13 +0100
http://localhost:1313/posts/permissions-strike-again/
- <h2 id="its-always-permissions">It’s always permissions</h2>
<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>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><em><strong>And it almost always has to do with permissions.</strong></em></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>
-
Post 3
diff --git a/public/posts/permissions-strike-again/index.html b/public/posts/permissions-strike-again/index.html
index b55cab6..2ba80f1 100644
--- a/public/posts/permissions-strike-again/index.html
+++ b/public/posts/permissions-strike-again/index.html
@@ -42,9 +42,8 @@
- 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.
+ 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!) 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?
diff --git a/themes/cuqui/assets/css/main.css b/themes/cuqui/assets/css/main.css
index c5de418..24130d9 100644
--- a/themes/cuqui/assets/css/main.css
+++ b/themes/cuqui/assets/css/main.css
@@ -64,14 +64,15 @@ body {
max-width: 768px;
}
-b {
- color: var(--rp-love);
+strong {
+ color: var(--rp-rose);
}
-i {
- color: var(--rp-muted)
+em {
+ color: var(--rp-rose);
}
+
header {
border-bottom: 1px solid #222;
margin-bottom: 1rem;
@@ -85,19 +86,20 @@ footer {
a {
color: var(--rp-foam);
- text-decoration: none;
+ text-decoration: underline dotted;
}
a:visited {
- color: var(--rp-pine);
+ color: var(--rp-subtle);
}
h1 {
color: var(--rp-gold);
/* background-color: var(--rp-overlay); */
- background-image: linear-gradient(to bottom, var(--rp-overlay), var(--rp-overlay), var(--rp-base));
+ background-image: linear-gradient(to bottom, var(--rp-highlight-high), var(--rp-overlay), var(--rp-base));
border-radius: 1rem 1rem 0 0;
padding: 1rem;
+ text-shadow: 1px 1px 2px black;
}
h2 {
@@ -106,6 +108,7 @@ h2 {
code {
background: var(--rp-surface);
+ color: var(--rp-gold);
padding: 0.3em;
border-radius: 1em;
font-size: 1.2em;
diff --git a/themes/cuqui/assets/css/syntax.css b/themes/cuqui/assets/css/syntax.css
index f05d05e..13e88c4 100644
--- a/themes/cuqui/assets/css/syntax.css
+++ b/themes/cuqui/assets/css/syntax.css
@@ -1,34 +1,19 @@
-:root {
- /* Rosé Pine Dawn */
- --rp-base: hsl(32deg, 57%, 95%);
- --rp-surface: hsl(35deg, 100%, 98%);
- --rp-overlay: hsl(33deg, 43%, 91%);
-}
-
-@media (prefers-color-scheme: dark) {
- :root {
- /* Rosé Pine */
- --rp-base: hsl(249deg, 22%, 12%);
- --rp-surface: hsl(247deg, 23%, 15%);
- --rp-overlay: hsl(248deg, 25%, 18%);
- }
-}
-
-
+/* TODO: map all these hexes to media var */
/* Background */
.bg {
color: #e0def4;
- background-color: var(--rp-surface);
+ background-color: hsl(247deg, 23%, 15%);
}
/* PreWrapper */
.chroma {
color: #e0def4;
- background-color: var(--rp-surface);
+ background-color: hsl(247deg, 23%, 15%);
}
+
/* Other */
.chroma .x {}
@@ -38,7 +23,14 @@
}
/* CodeLine */
-.chroma .cl {}
+.chroma .cl {
+
+ background-color: hsl(247deg, 23%, 15%);
+}
+
+.chroma .cl>* {
+ background-color: hsl(247deg, 23%, 15%);
+}
/* LineLink */
.chroma .lnlinks {
@@ -91,6 +83,7 @@
/* Line */
.chroma .line {
display: flex;
+ background-color: hsl(247deg, 23%, 15%);
}
/* Keyword */