Skip to content

Commit f1bbc86

Browse files
committed
make a blog section, and document how to add to it
1 parent edad08a commit f1bbc86

10 files changed

Lines changed: 56 additions & 17 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ to serve the website, and rebuild it on any changes, run `just dev`.
3737

3838
to clear your cache and built output, run `just clean`.
3939

40+
### writing posts
41+
42+
to write a new post, make a markdown file named `site/$YEAR/$MONTH/post-title.md`. Start it out like this:
43+
44+
```
45+
# Post title
46+
<date>2026-05-05</date>
47+
48+
Some content...
49+
```
50+
51+
To add images, place them in `site/$YEAR/$MONTH/images/`. You can then embed them in your markdown like this:
52+
53+
```
54+
![some alt text](./images/name.png)
55+
```
56+
4057
### deploying
4158

4259
`main` is automatically built and pushed by github actions. for now, you will need to make your own arrangements if wanting to deploy draft versions (from PRs, etc)

TODOS

Whitespace-only changes.

site/2026/05/new-site.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# New site
2+
<date>2026-05-25</date>
3+
4+
there is a new site, which i am testing by writing this post.
5+
6+
our previous one used wordpress, which was/is kind of a pain to maintain, so this new one is fully static and generated by [soupault](https://soupault.net/).

site/blog.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<h1>Posts</h1>
2+
3+
<div id="posts-index"></div>
4+
<hr class="visible"/>

site/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ <h1>Edinburgh Hacklab</h1>
1717
By creating a shared space to do this, we provide access to better facilities than we could each have at home, as well as opportunities to collaborate, learn, and socialise.
1818
We are not a coworking space.
1919
</p>
20+
<p>
21+
For more info on what our members are up to, check <a href="/blog">our blog</a>.
22+
</p>
2023
<section>
2124
<gallery>
2225
<img alt="A busy-looking room with a desk, a bookshelf, some flags on the wall, and a whiteboard" src="/img/main_gallery/01.jpg" />
@@ -32,7 +35,8 @@ <h1>Edinburgh Hacklab</h1>
3235
<img alt="A desk and shelves in the dark, lit by fairy lights." src="/img/main_gallery/11.jpg" />
3336
<img alt="A server rack, with a mix of servers in it." src="/img/main_gallery/12.jpg" />
3437
</gallery>
35-
<hr class="l"/>
38+
39+
<hr />
3640
</section>
3741
<section>
3842
<h3>How to become a member</h3>

site/legacy/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

soupault.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@
2121
file = "templates/legacy_posts.html"
2222
content_selector = "content"
2323
content_action = "replace_element"
24-
section = "fun/"
2524
path_regex = "(200.|201.|2020|2024)/.*$"
2625

26+
[templates.posts]
27+
file = "templates/posts.html"
28+
content_selector = "content"
29+
content_action = "replace_element"
30+
path_regex = "(20[^012].|202[^01234])/.*$"
31+
2732
[widgets.header]
2833
widget = "include"
2934
file = "templates/head_shared.html"
@@ -54,9 +59,9 @@
5459
sort_by = "date"
5560
sort_descending = true
5661

57-
[index.views.legacy]
58-
path_regex = "(200.|201.|2020|2024)/.*$"
59-
index_selector = "#legacy-posts-index"
62+
[index.views.posts]
63+
path_regex = "[0-9]{4}/.*$"
64+
index_selector = "#posts-index"
6065
index_item_template = """
6166
<article class="index-article">
6267
<span class="caption">{{date}}</span>

templates/header_navbar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<li><a href="/">Home</a></li>
77
<li><a href="/visit">Visit</a></li>
88
<li><a href="/chat">Contact Us</a></li>
9+
<li><a href="/blog">Posts</a></li>
910
</ul>
1011
</nav>
1112
</header>

templates/legacy_posts.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
<head>
33
</head>
44
<body>
5+
<header id="navbar"></header>
6+
57
<div class="legacy-post">
68
<aside>
79
<p>This post is from our old site - information in it may be out of date, and links are likely to be dead.</p>
810

911
<ul>
12+
<li><a href="/blog" class="no-visited">Other blog posts</a></li>
1013
<li><a href="/" class="no-visited">Go home</a></li>
11-
<li><a href="/legacy" class="no-visited">Other pre-2026 posts</a></li>
1214
</ul>
1315
</aside>
1416
<main>

templates/posts.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<header id="navbar"></header>
6+
7+
<main>
8+
<content />
9+
</main>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)