···11+++
22-title = "Test Post"
22+title = "The *Mega* test case"
33date = 2024-10-11
44-slug = "test-post"
55-description = "Testing out styling and features."
44+slug = "mega"
55+description = "How I write / leme check if that broke anything page"
6677[taxonomies]
88tags = ["meta"]
···2323can be [linked to](#section-headers) directly. To link to them, the header's text needs to be
2424*kebab-cased*, so the above would be `#section-headers`.
25252626-### But what about sub-headers?
2727-2828-I usually use `###` sub-headers to ask the question I think the reader is (or should be) asking at
2929-this point in the article. For example, if I just posted some code with an obvious error, I might
3030-follow that up with `### Wait, won't that crash?` or something similar. Using this approach lets
3131-me write posts in a conversational way, and helps me continually frame myself in the mind of the
3232-reader.
2626+Not quite a section header, the `<!-- more -->` tag is used to indicate where a post should be split for rss purposes. This should generally be right after the first paragraph.
33273428### Table of Contents
3529···4236has_toc = true
4337```
44384545-I don't like content that is nested more than 2 layers deep, so only `##` and `###` should be used
4646-to divide things up.
3939+The table of contents will only ever be generated for `##` and `###` headers. I don't particularly love the look of it and tend to write shorter posts so I hardly use it.
47404841## Embedding Code
49425050-This is prominently a coding blog, so code will show up a lot. First off, a monospaced text block is
5151-denoted by wrapping the text in triple back-tick characters <code>```</code>.
5252-5353-```
5454-┌──────────────────────────┐
5555-│ This text is monospaced. │
5656-│ This │
5757-│ text │
5858-│ is │
5959-│ monospaced. │
6060-└──────────────────────────┘
6161-```
4343+I tend to do this alot so this is an important bit of the blog. All code blocks with a code type are progressively enhanced with a copy button.
62446345### Syntax Highlighting
64466547If you want syntax coloring, you put the name of the programming language immediately after the ticks.
6648So writing this:
67496868-~~~
5050+~~~md
6951```rust
7052fn main() {
7153 println!("Hello, world!");
···85678668Sometimes it can help to give a header to a code block to signal what it represents. To do this, you put
8769a single-line block quote immediately before the code block. So by prepending the following code with
8888-`> src/main.rs`, I can produce this:
8989-9090-> src/main.rs
9191-```rust
9292-fn main() {
9393- println!("This code is in main.rs!");
9494-}
9595-```
9696-9797-This can be useful to explicitly state the programming language or format being used:
9898-9999-> TOML
100100-```toml
101101-title = "Test Post"
102102-slug = "test-post"
103103-description = "Testing out styling and features."
7070+`> src/index.ts`, I can produce this:
10471105105-[taxonomies]
106106-tags = ["meta"]
7272+> src/index.ts
7373+```ts
7474+Bun.serve({
7575+ port: 3000,
7676+ fetch(req) {
7777+ return new Response("Hello, world!");
7878+ }
7979+});
10780```
1088110982### Inline Code
1108311184As seen above, sometimes code items are mentioned in regular paragraphs, but you want to
112112-draw attention to them. To do this, you can wrap it in ` back-tick quotes. For
8585+draw attention to them. To do this, you can wrap it in back-tick (\`) quotes. For
11386example, if I wanted to mention Rust's `Vec<T>` type.
1148711588```md
···130103wrap it in a `blockquote` tag:
131104132105> "This text will appear italicized in a quote box!"
133133-134134-### Reader Questions
135135-136136-When displaying reader questions, I start the block quote with a bolded name, like so:
137137-138138-> **SonicFan420x69 asks:**
139139->
140140-> “What is your opinion of the inimitable video game character, Sonic the Hedgehog? Please
141141-> answer soon as it is a matter of life or death.”
142106143107### Cited Quotations
144108···150114>
151115> <cite>Bilbo Baggins</cite>
152116153153-## Icons & Images
154154-155155-They were shown in the previous section, but icons (provided by [Remix Icon](https://remixicon.com/)),
156156-can be used anywhere by inserting an `<i>` tag with the icon's class. These are useful for adding
157157-some detail and decorating to the pages, and is another way to break up text.
158158-159117## Embedding Media
160118161119Images and videos are a great way to break up content and prevent text fatigue.
···175133176134You can also add captions to images:
177135178178-<figure>
179179- <img src="https://img.itch.zone/aW1hZ2UvNTU2NDU0LzI5MTYzNzkucG5n/original/8LIdCb.png" alt="NOISE1 screenshot">
180180- <figcaption>
181181- NOISE1 is a dark sci-fi hacker-typing stealth game.
182182- </figcaption>
183183-</figure>
184184-185185-But there is no way to do this in markdown so you have to use the `<figure>` tag like so:
186186-187187-```html
188188-<figure>
189189- <img src="/path/to/image.png" alt="Alt text goes here.">
190190- <figcaption>Caption text goes here.</figcaption>
191191-</figure>
136136+```terra
137137+{{/* img(id="https://url.com/image.png" alt="alt text" caption="this can be ommited if you want or added! It's optional :)") */}}
192138```
193139194194-### Videos
140140+{{ img(id="https://cloud-owp7vmln1-hack-club-bot.vercel.app/0img_1846_1_.jpg" alt="MacBook proprietary blade SSD" caption="it really was a rather sleek design; shame that apple got rid of it in favor of soldered on storage") }}
195141196196-To embed a video, you use the `youtube` shortcode e.g.
197197-198198-> post.md
199199-```md
200200-{{/* youtube(id="kiWvNwuBbEE") */}}
201201-```
142142+### Videos
202143203203-You can also add the `autoplay=true` flag to make the video autoplay.
144144+To embed a video, you use the `youtube(id="", autoplay?=bool)` shortcode e.g.
204145205146{{ youtube(id="NodwjZF7uZw") }}
206147207207-The shortcode is processed into an iframe which looks like this:
148148+### Bluesky posts
208149209209-> post.html
210210-```html
211211-{{ youtube(id="kiWvNwuBbEE") }}
212212-```
150150+This is handled by a shortcode `bluesky(post="")` and takes the post url as a parameter. These will automatically attach images and videos.
151151+152152+{{ bluesky(post="https://bsky.app/profile/svenninifl.bsky.social/post/3lnkivz3ans2k") }}
213153214154## Miscellaneous
215155