Created On: Tue, 24th January (2026)
So I setup more of a structure. Now I have a skeleton-log page instead of the index, and I’ve separated the class Genesis from the entries themselves.
Basically, it should be easier to add entries. Though it’s not exactly perfect. For example, I have to manually add each entry to the list. Not to mention that the sorting leaves a bit to be desired.
Speaking of sorting though… Turns out I’ve hit one of Astro’s limitations. In order to implement it, I’m basically working with query parameters and, as a result, I had to turn Astro’s mode to SERVER. Why? I think it’s cause you can’t exactly generate static methods of working with query parameters. What would the thing even look like? You’d need some javascript to cook up that thing.
Anyways, this might become an issue - but I can use SVELTE components. The only problem is that I cannot use Astro components in Svelte - though it can go the other way around. In other words, it won’t exactly make much sense to have a registry that is setup in svelte, which also brings limitations when it comes to ordering and sorting.
Raw javascript is possible of course… But it’s raw. I mean, it’s worth sharpening my skills, but it’d also be a pain to implement much of anything.
…using server mode just to order posts feels a bit ludicrous though.
…in any case, here’s some code:
<Code title="genesis.astro" code={`<h2>Genesis</h2>
<h3>META</h3>
<div class="sort-array"> <span>Sort by:</span> <a href="?order=ASC">ASC</a> <a href="?order=DESC">DESC</a></div>
{ items.map(Component => <Component/>) }
<Base> <!-- <Welcome /> --></Base>`} lang="astro"/>
<Code title="astro.config.mjs" code={`export default defineConfig({ integrations: [svelte(), expressiveCode({ themes: ['aurora-x'], styleOverrides: { // You can also override styles borderRadius: '0.5rem', frames: { shadowColor: '#324', }, codeFontFamily: "Geist Mono", }, })],
adapter: node({ mode: 'standalone' }),
output: "server"});`} lang="mjs" ins={{ range: "14-18" }}/>Not to mention the line numbers. Had to install a separate dependency for that called @expressive-code/plugin-line-numbers.
<Code code="npm i @expressive-code/plugin-line-numbers" frame="terminal" lang="bash"/>…and of course the config for expressive code, which is in a separate file…
<Code title="ec.config.mjs" code={`import { defineEcConfig } from 'astro-expressive-code'import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
export default defineEcConfig({ plugins: [pluginLineNumbers()],})`} lang="mjs"/>Anyways, that’s all for now.