Skip to content

Commit 40164db

Browse files
author
Brooke Hatton
committed
Switch to astro
1 parent f4988e7 commit 40164db

62 files changed

Lines changed: 652 additions & 591 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/workflows/deploy.ymlβ€Ž

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
25+
with:
26+
path: .
27+
28+
deploy:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

β€Ž.gitignoreβ€Ž

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,34 @@
1+
# build output
2+
dist/
13

2-
bootstrap/node_modules/*
4+
# Local fonts
5+
fonts/
36

4-
bootstrap/CHANGELOG.md
7+
# cache files
8+
.eslintcache
59

6-
.jekyll-cache
7-
_site
10+
# generated types
11+
.astro/
12+
13+
# dependencies
14+
node_modules/
15+
package-lock.json
16+
17+
# logs
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
pnpm-debug.log*
22+
23+
# environment variables
24+
.env
25+
.env.production
26+
27+
# macOS-specific files
28+
.DS_Store
29+
30+
# Local Netlify folder
31+
.netlify
32+
33+
# Local Vercel folder
34+
.vercel

β€Ž.prettierrcβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€ŽGemfileβ€Ž

Lines changed: 0 additions & 31 deletions
This file was deleted.

β€ŽGemfile.lockβ€Ž

Lines changed: 0 additions & 77 deletions
This file was deleted.

β€ŽREADME.mdβ€Ž

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,88 @@
1-
# brookehatton.com
1+
# Brooke Hatton's Blog - Astro Version
22

3-
This repo for my public site [brookehatton.com](https://brookehatton.com).
3+
This is an Astro version of Brooke Hatton's personal blog, converted from Jekyll.
44

5-
## Stack
5+
## πŸš€ Getting Started
66

7-
Built with Jekyll, SCSS and HTML, code formatted with [prettier.io](https://prettier.io).
7+
1. Install dependencies:
88

9+
```bash
10+
npm install
11+
```
12+
13+
2. Start the development server:
14+
15+
```bash
16+
npm run dev
17+
```
18+
19+
3. Open [http://localhost:4321](http://localhost:4321) in your browser.
20+
21+
## 🧞 Commands
22+
23+
All commands are run from the root of the project, from a terminal:
24+
25+
| Command | Action |
26+
| :---------------- | :------------------------------------------- |
27+
| `npm install` | Installs dependencies |
28+
| `npm run dev` | Starts local dev server at `localhost:4321` |
29+
| `npm run build` | Build your production site to `./dist/` |
30+
| `npm run preview` | Preview your build locally, before deploying |
31+
32+
## πŸ“ Project Structure
33+
34+
```
35+
/
36+
β”œβ”€β”€ public/
37+
β”‚ β”œβ”€β”€ images/
38+
β”‚ β”œβ”€β”€ stylesheets/
39+
β”‚ └── ...
40+
β”œβ”€β”€ src/
41+
β”‚ β”œβ”€β”€ components/
42+
β”‚ β”‚ β”œβ”€β”€ Footer.astro
43+
β”‚ β”‚ β”œβ”€β”€ Navigation.astro
44+
β”‚ β”‚ └── PostList.astro
45+
β”‚ β”œβ”€β”€ content/
46+
β”‚ β”‚ β”œβ”€β”€ blog/
47+
β”‚ β”‚ └── config.ts
48+
β”‚ β”œβ”€β”€ layouts/
49+
β”‚ β”‚ └── BaseLayout.astro
50+
β”‚ └── pages/
51+
β”‚ β”œβ”€β”€ blog/
52+
β”‚ β”‚ β”œβ”€β”€ [...slug].astro
53+
β”‚ β”‚ └── feed.xml.js
54+
β”‚ β”œβ”€β”€ blog.astro
55+
β”‚ └── index.astro
56+
└── package.json
57+
```
58+
59+
## 🎯 Features
60+
61+
- βœ… Static site generation
62+
- βœ… Blog posts with markdown support
63+
- βœ… RSS feed
64+
- βœ… Responsive design
65+
- βœ… SEO friendly
66+
- βœ… Fast performance
67+
68+
## πŸ“ Adding New Posts
69+
70+
Add new blog posts as markdown files in `src/content/blog/`. Each post should have frontmatter with:
71+
72+
```yaml
73+
---
74+
title: "Your Post Title"
75+
date: 2024-01-01
76+
categories: ["Category"]
77+
description: "Optional description"
78+
---
79+
```
80+
81+
## πŸš€ Deployment
82+
83+
The site can be deployed to any static hosting service. For GitHub Pages:
84+
85+
1. Build the site: `npm run build`
86+
2. Deploy the `dist/` folder
87+
88+
Built with [Astro](https://astro.build) πŸš€

β€Ž_config.ymlβ€Ž

Lines changed: 0 additions & 54 deletions
This file was deleted.

β€Ž_includes/footer.htmlβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Ž_includes/post-list.htmlβ€Ž

Lines changed: 0 additions & 21 deletions
This file was deleted.

β€Ž_includes/stylings.htmlβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
Β (0)