Skip to content

Commit 65a0fe5

Browse files
authored
Add Astro blog structure with posts, layouts, and components (#2)
* feat: add Astro blog structure with posts, layouts, and components * fix: update site title and description to reflect project branding
1 parent 1d8a9c2 commit 65a0fe5

37 files changed

Lines changed: 2013 additions & 0 deletions

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Build output
2+
dist/
3+
4+
# Generated types
5+
.astro/
6+
7+
# Dependencies
8+
node_modules/
9+
10+
# Logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Environment variables
17+
.env
18+
.env.production

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Dev",
6+
"command": "bun run dev",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
},
10+
{
11+
"name": "Build",
12+
"command": "bun run build",
13+
"request": "launch",
14+
"type": "node-terminal"
15+
}
16+
]
17+
}

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
11
# HotFix.Day — Fixes, Failures & the Future of DevOps
22

33
> Things break in production; we write about why. Incident analysis, infrastructure automation, CI/CD, observability, and open-source SRE tooling.
4+
5+
## File structure
6+
7+
```text
8+
├── public/
9+
├── src/
10+
│   ├── assets/
11+
│ │ └── fonts/
12+
│   ├── components/
13+
│   ├── content/
14+
│   ├── layouts/
15+
│   ├── pages/
16+
│   └── styles/
17+
├── astro.config.mjs
18+
├── README.md
19+
├── package.json
20+
└── tsconfig.json
21+
```
22+
23+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
24+
25+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
26+
27+
The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.
28+
29+
Static assets like images and fonts are stored in `src/assets/` so Astro can optimize and bundle them at build time. Images are processed by [Sharp](https://sharp.pixelplumbing.com/) and converted to WebP. Fonts are managed via the [Astro Fonts API](https://docs.astro.build/en/guides/fonts/) with optimized fallbacks to minimize layout shift. Only favicons belong in `public/`.
30+
31+
## Commands
32+
33+
| Command | Action |
34+
| :------------------------ | :----------------------------------------------- |
35+
| `bun install` | Installs dependencies |
36+
| `bun run dev` | Starts local dev server at `localhost:4321` |
37+
| `bun run build` | Build your production site to `./dist/` |
38+
| `bun run preview` | Preview your build locally, before deploying |
39+
| `bun run astro ...` | Run CLI commands like `astro add`, `astro check` |
40+
| `bun run astro -- --help` | Get help using the Astro CLI |
41+
42+
## Debugging
43+
44+
The project includes a `.vscode/launch.json` with pre-configured debug profiles. Open the **Run and Debug** panel (`Ctrl+Shift+D`) and select a configuration:
45+
46+
- **Dev** — starts `bun run dev` with the VS Code debugger attached. Set breakpoints in `.astro` and `.ts` files and hit `F5`.
47+
- **Build** — runs `bun run build` under the debugger, useful for diagnosing build-time issues in content collections or image processing.

astro.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @ts-check
2+
import mdx from '@astrojs/mdx';
3+
import sitemap from '@astrojs/sitemap';
4+
import { defineConfig, fontProviders } from 'astro/config';
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
site: 'https://www.hotfix.day',
9+
integrations: [mdx(), sitemap()],
10+
fonts: [
11+
{
12+
provider: fontProviders.local(),
13+
name: 'Atkinson',
14+
cssVariable: '--font-atkinson',
15+
options: {
16+
variants: [
17+
{
18+
src: ['./src/assets/fonts/atkinson-regular.woff'],
19+
weight: 400,
20+
style: 'normal',
21+
},
22+
{
23+
src: ['./src/assets/fonts/atkinson-bold.woff'],
24+
weight: 700,
25+
style: 'normal',
26+
},
27+
],
28+
},
29+
},
30+
],
31+
});

bun.lock

Lines changed: 789 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "hotfix.day",
3+
"homepage": "https://www.hotfix.day",
4+
"repository": "github:hotfixday/hotfix.day",
5+
"description": "HotFix.Day — Fixes, Failures & the Future of DevOps. Things break in production; we write about why. Incident analysis, infrastructure automation, CI/CD, observability, and open-source SRE tooling.",
6+
"license": "Apache-2.0",
7+
"type": "module",
8+
"author": {
9+
"name": "Rishav Dhar",
10+
"url": "https://www.rdhar.dev"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/hotfixday/hotfix.day/issues"
14+
},
15+
"funding": {
16+
"type": "github",
17+
"url": "https://github.com/sponsors/rdhar"
18+
},
19+
"engines": {
20+
"node": ">=22.12.0"
21+
},
22+
"scripts": {
23+
"dev": "bunx --bun astro dev",
24+
"build": "bunx --bun astro build",
25+
"preview": "bunx --bun astro preview",
26+
"astro": "bunx --bun astro"
27+
},
28+
"dependencies": {
29+
"@astrojs/mdx": "5.0.3",
30+
"@astrojs/rss": "4.0.18",
31+
"@astrojs/sitemap": "3.7.2",
32+
"astro": "6.1.2",
33+
"sharp": "0.34.5"
34+
},
35+
"devDependencies": {
36+
"@types/bun": "1.3.11"
37+
}
38+
}

public/favicon.ico

655 Bytes
Binary file not shown.

public/favicon.svg

Lines changed: 9 additions & 0 deletions
Loading

src/assets/blog-placeholder-1.jpg

31.3 KB
Loading

0 commit comments

Comments
 (0)