Skip to content

Commit

Permalink
Merge pull request #4 from dually8/update-to-astro
Browse files Browse the repository at this point in the history
Update to astro
  • Loading branch information
dually8 authored Dec 18, 2024
2 parents 69901c8 + 58a985f commit b1bd71a
Show file tree
Hide file tree
Showing 218 changed files with 7,514 additions and 16,914 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
root = true
charset = utf-8
end_of_line = crlf
indent_size = 2
indent_style = space
insert_final_newline = true
tab_width = 2
trim_trailing_whitespace = true
27 changes: 17 additions & 10 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
hugo-version: '0.119.0'
extended: true
node-version: "20"
cache: "npm"
cache-dependency-path: "./package-lock.json"

- name: Install dependencies
run: npm ci

- name: Build
run: hugo
- uses: FirebaseExtended/action-hosting-deploy@v0.7.1
run: npm run build

- uses: FirebaseExtended/action-hosting-deploy@v0.9.0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MYWEBSITE_555F6 }}'
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_MYWEBSITE_555F6 }}"
channelId: live
projectId: mywebsite-555f6
23 changes: 0 additions & 23 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

47 changes: 31 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/

# Logs
logs
*.log
Expand Down Expand Up @@ -65,21 +90,11 @@ node_modules/
# dotenv environment variables file
.env

# Hugo
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock

# IDEs
.vs/
.idea/
.idea/
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
6 changes: 0 additions & 6 deletions archetypes/default.md

This file was deleted.

32 changes: 32 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-check
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import svelte from '@astrojs/svelte';

// https://astro.build/config
export default defineConfig({
site: 'https://cjcoffey.com',
integrations: [mdx(), sitemap({
filter: filterSitemap,
}), svelte()],
prefetch: true,
markdown: {
shikiConfig: {
theme: 'dracula-soft',
wrap: true,
}
},
experimental: {
svg: true,
}
});

/**
* Removes the resume and links pages from the sitemap
* @param {string} page The page to filter
* @returns {boolean} Whether or not to include the page in the sitemap
*/
function filterSitemap(page) {
return page !== 'https://cjcoffey.com/resume/' && page !== 'https://cjcoffey.com/links/';
}
136 changes: 0 additions & 136 deletions config.yml

This file was deleted.

62 changes: 0 additions & 62 deletions content/drafts/2024-wrapped.md

This file was deleted.

Loading

0 comments on commit b1bd71a

Please sign in to comment.