Compare commits

..
9 changed files with 237 additions and 10 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "posts"]
path = posts
url = https://git.satr14.my.id/satr14/dumps.git

View file

@ -4,7 +4,6 @@ import metadata from "./metadata.json";
import templateRaw from "./templates/post.html" with { type: "text" };
import homeRaw from "./templates/home.html" with { type: "text" };
const TRACKER_HEADER = `<script defer src="https://a.satr14.my.id/script.js" data-website-id="fe5155fe-e5dc-4096-a524-0c2589c859a7"></script>`;
const year = new Date().getFullYear().toString();
const applyVars = (raw: unknown) => (raw as string)
.replaceAll("[[SITE]]", metadata.title)
@ -52,9 +51,6 @@ await Promise.all(posts.map(async (post) => {
tagFilter: true,
});
const render = template
.replaceAll("[[HEAD_EXTRA]]", frontmatter.draft
? "<meta name=\"robots\" content=\"noindex\">"
: TRACKER_HEADER)
.replaceAll("[[TITLE]]", `${metadata.title} - ${frontmatter.title}`)
.replaceAll("[[POST_TITLE]]", frontmatter.title)
.replaceAll("[[DATE]]", frontmatter.date.toDateString())

1
posts

@ -1 +0,0 @@
Subproject commit a6bc30e4abc671595fd847cb64931373f09bcd4b

5
posts/TEMPLATE.md Normal file
View file

@ -0,0 +1,5 @@
title: REPLACE ME
desc: Lorem ipsum dolor sit amet
date: YYYY-MM-DD
draft: true
^---

25
posts/hello-world.md Normal file
View file

@ -0,0 +1,25 @@
title: Hello World!
desc: I've been procrastinating for a long time but here we are.
date: 2026-06-03
draft: false
^---
Honestly didn't even thought I would build this mainly because of burnout from school and just life in general. But I managed to lock in on building this blog project mainly because I've been needing a place to dump my mind and ideas on and I've been looking for an opportunity to practice and fix my grammar and ~~totally formal~~ writing. I'll be talking about more than just tech related stuff and _maybe_ some real life things I'm experiencing.
I will hopefully develop and expand this blog with more features and write more than my previous blogs. Not a guarantee but I really hope so as I have a _bad_ habit of leaving things undocumented. The current way of making new blog posts doesn't really allow me to make posts from mobile easily so I might not post as often as I wanted to but I'll fix that later. I also have plans to make this my main website _if_ things are _stable enough_ and this ends up receiving more traffic.
---
## Technical Details
The design and architecture of this blog are heavily inspired by my friend's site, [orangc](https://notes.orangc.net/). Only difference being that I wrote a custom static site generator from scratch using [Bun](https://bun.com/) as it has a [builtin parser for Markdown](https://bun.com/docs/runtime/markdown). I'm pretty proud of the end result so far, the build script uses _zero_ NPM dependencies (_except for [Tailwind](https://tailwindcss.com/) of course_) and everything was actually relatively fast with full lighthouse scores. Everything is hosted on [Cloudflare Workers](https://www.cloudflare.com/products/workers/) with the source code for this site hosted on [my Forgejo instance](https://git.satr14.my.id/satr14/ssg.md) (including all posts written in markdown, you can click on the **view revisions** link under the post title to view the commits for this post).
This isn't one of my first attempts of witting a blog website. Most of them failed mainly due to lack of motivation to actually write anything. I tried using [Hugo](https://gohugo.io/) once but that learning curve (~~or just a skill issue~~) was too high for me so I opted to write my own blog from scratch using [SvelteKit](https://kit.svelte.dev/) and [Pocketbase](https://pocketbase.io/) which was **highly** overkill and it was tedious to even write.
List of features to implement:
- [ ] Draft/unlisted/private label
- [ ] Make private posts from a custom source
- [ ] Table of contents
- [ ] Comments, Reactions, View counts
- [ ] Live message feed for anything I feel like shit-posting (think WhatApp channels)
- [ ] Submission form to send messages to me straight from this site

5
posts/school-db-leak.md Normal file
View file

@ -0,0 +1,5 @@
title: That one time I "hacked" my school
desc: Got their website source code along with ~230 student data
date: 2026-06-06
draft: true
^---

15
posts/sysadmin-prod.md Normal file
View file

@ -0,0 +1,15 @@
title: The user will always complain
desc: Especially if they dont understand shit about your job
date: 2026-06-06
draft: true
^---
In the 3 years of me owning a homelab, the only user that actually uses it was myself. This pretty much means that if it goes down then its no big deal. After a while, I started using it for real production use like hosting websites and Discord bots as well as hosting my git repositories and migrating off from GitHub.
Still, the only person that's using it most of the time is me. If things goes down? It's no big deal because it was my stuff anyways and I can be patient as I know the process to fix things doesn't happen in an instant. But recently, **that changed**.
## The Minecraft Server
At the start of April 2026, I was just experimenting with hosting a private Minecraft server in class during break hours. My friends saw my screen and asked if they could join. I figured why not thinking it was just a temporary thing. But after a while word spread around the friend group and they also wanted to join. (keep in mind, the server was still in testing phase. barely anything was tested stable enough)
So I decided to just open it into the public and let anyone invite their friends in. All good until one of your friends suggested a mod, and rather stupidly, I agreed to add it in without testing and slowly but surely the server started to lag with more people and more mods being added without play testing. Eventually TPS dropped to as low as 4 and people complained.

185
posts/test.md Normal file
View file

@ -0,0 +1,185 @@
title: Comprehensive Markdown & GFM Syntax Reference
desc: A detailed guide to Markdown and GitHub Flavored Markdown (GFM) syntax, covering text formatting, lists, tables, code blocks, links, and footnotes.
date: 2026-05-27
draft: true
^---
<!-- THIS IS A COMMENT -->
This document serves as a comprehensive reference for Markdown and GitHub Flavored Markdown (GFM) syntax. It covers various formatting options, list types, table creation, code block usage, link formatting, and footnote implementation.
The purpose is to test and demonstrate the full range of Markdown features, ensuring that all syntax is correctly rendered and supported in the target environment. This includes both standard Markdown elements and GFM-specific extensions.
_This post was generated by AI for testing purposes_
---
## Images
![Alt text](https://picsum.photos/150)
---
## HTML in Markdown
<details>
<summary>Click to expand HTML content</summary>
<p>This is a block of HTML content embedded within Markdown. It can include any valid HTML elements, such as this <strong>bold text</strong> and this <em>italic text</em>.</p>
<ul>
<li>HTML List Item 1</li>
<li>HTML List Item 2</li>
</ul>
</details>
<iframe src="https://google.com" width="300" height="200"></iframe>
<br>^^ This **shouldn't** render as an iframe but should show the raw HTML code
---
## Text Formatting & Structure
* **Bold:** **This text is bold** or __this is bold__.
* **Italic:** *This text is italic* or _this is italic_.
* **Strikethrough (GFM):** ~~This text is crossed out.~~
* **Combined:** ***This text is bold and italic***.
* **Inline Code:** Use single backticks for `console.log("Hello World")` inline.
### Hierarchy Example
> **Blockquotes:** Use blockquotes to highlight quotes, notes, or warnings.
>
> "The best way to predict the future is to invent it."
> > Nested blockquotes are supported by adding an extra `>`.
---
## Lists
### Unordered (Bulleted)
* Item 1
* Nested Item 1.1
* Nested Item 1.2
* Item 2
### Ordered (Numbered)
1. First item
2. Second item
1. Nested ordered item
2. Another nested item
3. Third item
### Task Lists (GFM)
- [x] Write the Markdown test template
- [ ] Implement features in production
- [ ] Review documentation
---
## Links and Autolinks
* **Standard Link:** [Search Engine](https://www.google.com)
* **Link with Tooltip:** [GitHub](https://github.com "Go to GitHub")
* **Autolink (GFM):** https://nixos.org
---
## Tables (GFM)
| Feature | Standard Markdown | GFM Extension | Status |
| :--- | :---: | :---: | ---: |
| Tables | ✗ | ✓ | Implemented |
| Task Lists | ✗ | ✓ | Implemented |
| Autolinks | ✗ | ✓ | Native |
| Strikethrough | ✗ | ✓ | Implemented |
---
## Code Blocks with Syntax Highlighting
```bash
#!/usr/bin/env bash
set -euo pipefail
# Variables & string manipulation
NAME="world"
GREETING="Hello, ${NAME}!"
UPPER=${GREETING^^}
SLICE=${GREETING:0:5}
echo "$UPPER | $SLICE"
# Arrays
FRUITS=(apple banana cherry)
FRUITS+=(mango)
echo "${FRUITS[@]}" # all elements
echo "${#FRUITS[@]}" # length
echo "${FRUITS[@]:1:2}" # slice
# Associative array
declare -A CONFIG=([host]="localhost" [port]="8080")
echo "${CONFIG[host]}:${CONFIG[port]}"
# Arithmetic
COUNT=0
(( COUNT += 5 ))
RESULT=$(( COUNT ** 2 ))
echo "$RESULT"
# Conditionals & test operators
FILE="/etc/hosts"
if [[ -f "$FILE" && -r "$FILE" ]]; then
echo "readable"
elif [[ -e "$FILE" ]]; then
echo "exists but not readable"
else
echo "not found"
fi
# Case
case "$NAME" in
world|earth) echo "planet" ;;
*) echo "unknown" ;;
esac
# Loops
for fruit in "${FRUITS[@]}"; do
echo "fruit: $fruit"
done
for (( i=0; i<3; i++ )); do
echo "i=$i"
done
WHILE=3
while (( WHILE-- > 0 )); do
echo "while: $WHILE"
done
# Functions with local vars & return codes
greet() {
local name=${1:-"stranger"}
local -r greeting="Hi, $name!"
echo "$greeting"
return 0
}
greet "$NAME"
# Command substitution & process substitution
DATE=$(date +%Y-%m-%d)
DIFF=<(echo "foo")
echo "Today: $DATE"
# Here-doc
cat <<EOF
Multiline
text block
EOF
# Pipelines, redirection & traps
trap 'echo "exiting"; exit 1' ERR
echo "hello" | tr '[:lower:]' '[:upper:]' > /dev/null 2>&1
# Parameter expansion: default, error, replace
echo "${UNSET:-default}"
echo "${GREETING/Hello/Hey}"
echo "${FILE##*/}" # basename
echo "${FILE%/*}" # dirname
```

View file

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[[TITLE]]</title>
<link rel="stylesheet" href="../style.css">
[[HEAD_EXTRA]]
<script defer src="https://a.satr14.my.id/script.js" data-website-id="fe5155fe-e5dc-4096-a524-0c2589c859a7"></script>
<meta name="description" content="[[DESC]]">
<meta name="author" content="[[NAME]]">