--- /dev/null
+<!-- Copyright (c) 2023-2024 Jakub Czajka <jakub@ekhem.eu.org> -->
+<!-- License: GPL-3.0 or later. -->
+<!-- 💪 (1F4AA) 😎 (1F60E) -->
+<h2>Jakub Czajka's website 💪😎</h2>
+<h3 style="margin-bottom: 0px;">About</h3>
+<hr/>
+<ul style="list-style-type: none; padding-left: 15px;">
+ <li>
+ <!-- 📄 (1F4C4) -->
+ 📄 <a href="https://ekhem.eu.org/cv">CV</a>
+ </li>
+</ul>
+<h3 style="margin-bottom: 0px;">Contact</h3>
+<hr/>
+<ul style="list-style-type: none; padding-left: 15px;">
+ <li>
+ <!-- 📫 (1F4EC) -->
+ 📬 <a href="mailto:jakub@ekhem.eu.org">jakub@ekhem.eu.org</a>
+ </li>
+ <li>
+ <!-- 🔑 (1F511) -->
+ 🔑
+ <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/CB552A2D05AE8FE44503E5C71F81DE6C733FE873">
+ GPG key</a>
+ </li>
+</ul>
+<h3 style="margin-bottom: 0px;">Links</h3>
+<hr/>
+<ul style="list-style-type: none; padding-left: 15px;">
+ <li>
+ <img src="media/git.png" alt="git" style="height: 1em;">
+ <a href="https://git.ekhem.eu.org">Projects</a>
+ </li>
+</ul>
+<h3 style="margin-bottom: 0px;">Articles</h3>
+<hr/>
+<ul style="list-style-type: none; padding-left: 15px;">
+ <li>
+ <a href="articles/web">article1</a>
+ </li>
+</ul>
+<br/>
border-style: double;
padding: 5px;
}
- h3 {
- margin-bottom: 0px;
- }
- p {
- margin: auto 10px;
- }
- ul {
- list-style-type: none;
- padding-left: 15px;
- }
- li img {
- height: 1em;
- }
.bottom-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
</head>
<body>
<div class="top-container">
- <!-- 💪 (1F4AA) 😎 (1F60E) -->
- <h2>Jakub Czajka's website 💪😎</h2>
- <h3>About</h3>
- <hr/>
- <ul>
- <li>
- <!-- 📄 (1F4C4) -->
- 📄 <a href="https://ekhem.eu.org/cv">CV</a>
- </li>
- </ul>
- <h3>Contact</h3>
- <hr/>
- <ul>
- <li>
- <!-- 📫 (1F4EC) -->
- 📬 <a href="mailto:jakub@ekhem.eu.org">jakub@ekhem.eu.org</a>
- </li>
- <li>
- <!-- 🔑 (1F511) -->
- 🔑
- <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/CB552A2D05AE8FE44503E5C71F81DE6C733FE873">
- GPG key</a>
- </li>
- </ul>
- <h3>Links</h3>
- <hr/>
- <ul>
- <li>
- <img src="media/git.png" alt="git">
- <a href="https://git.ekhem.eu.org">Projects</a>
- </li>
- </ul>
- <h3>Articles</h3>
- <hr/>
- <!-- 🤔 (1F914) -->
- <p>There's nothing here 🤔</p>
- <br/>
+ <!--#include file="$content.html" -->
</div>
<div class="bottom-container">
<p>Modified: </p>
add_header Content-Disposition 'inline';
}
+ # Dynamic SSI from
+ # https://www.nginx.com/resources/wiki/start/topics/examples/dynamic_ssi.
+ #
+ # If user requests /page.html, nginx should first serve /index.html which
+ # then requests /page.html.
+ #
+ # Simply rewriting /page.html to /index.html causes an infinite loop because
+ # /index.html requests /page.html.
+ #
+ # Instead, if user requests /index.html with /page.html, they should instead
+ # hit /page.
+ # 1. User requests /page.
+ # 2. Nginx serves /index.html.
+ # 3. /index.html requests /page.html.
+ # 4. /page.html serves page.html.
location / {
- index index.html;
+ ssi on;
+
+ set ${dollar}content ${dollar}request_uri;
+ if (${dollar}request_uri = "/") {
+ set ${dollar}content "/home";
+ }
+ if (!-f ${dollar}request_filename) {
+ rewrite ^ /index.html last;
+ }
+ if (!-f ${dollar}document_root${dollar}content.html) {
+ return 404;
+ }
+ }
+
+ # /index.html is an edge case.
+ location = /index {
+ return 301 /;
+ }
+
+ # Images should be served as-is.
+ location /media {
}
}