- MDX 44.3%
- Astro 27.9%
- TypeScript 26.2%
- Clojure 0.8%
- JavaScript 0.4%
- Other 0.4%
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .vscode | ||
| migrations | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitignore | ||
| .nvmrc | ||
| .prettierrc | ||
| astro.config.mjs | ||
| biome.json | ||
| Dockerfile | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
Snorre.io
This is the source code for my personal website, snorre.io. It is built using Astro, a modern static site generator built on top of Vite. The source code is free and open source. Feel free to poke around and use it as inspiration for your own website.
🚀 Quickstart
To get started, clone this repo, install dependencies and run dev server:
git clone git@github.com:snorremd/snorreio.git
cd snorreio
bun install
bun run dev
🏗 Project structure
This project was bootstrapped from the Astro blog template with my own modifications and changes added.
It mostly still follows the same structure as the blog template:
├── public/
├── src/
│ ├── components/
│ ├── layouts/
│ └── pages/
├── astro.config.mjs
├── README.md
├── package.json
└── tsconfig.json
Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the public/ directory.
📁 Pages
Essentially I have a few main pages:
index.astro- The landing page with some info about my siteblog.astro- The blog page with a list of all blog postsblog/[slug].mdx- A blog post template for each blog postabout.mdx- Some backstory about meprivacy.mdx- Privacy policy detailing what data I collect (not much)projects.astro- List of projects I have worked on
🎨 Styling
I use Tailwind CSS for styling, which is a utility-first CSS framework.
📦 Components
I have a few components that I use throughout the site. The components folder also includes my Solid.js comment system and likes functionality.
API Endpoints
/api/likes- Handles user likes for blog posts and other content
🧞 Commands
All commands are run from the root of the project, from a terminal:
📦 Basic Commands
| Command | Action |
|---|---|
bun install |
Installs dependencies |
bun run dev |
Starts local dev server at localhost:3000 |
bun run build |
Build your production site to ./dist/ |
bun run build:watch |
Build your site and watch for changes |
bun run preview |
Preview your build locally, before deploying |
bun run astro ... |
Run CLI commands like astro add, astro check |
bun run astro --help |
Get help using the Astro CLI |
🔧 Development Scripts
| Command | Action |
|---|---|
bun run format |
Format code with Biome |
bun run lint |
Lint code with Oxlint |
bun run check |
Type check with Astro |
🚀 Deployment
The site is hosted on Scaleway and deployed via Docker.
License
The source code is licensed under the MIT License. You are free to use it for your own website, but please provide attribution where you make direct use of my code.
The content, unless otherwise stated, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Feel free to publish copies or derived work, but you must provide attribution and link back to my site and you must share any derivative work under the same license. Commercial use of my content is not allowed.