Skip to content

SvelteKit migration #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 101 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
96b0690
switched to markdown style headers and lists
teauxfu Jul 5, 2025
8c31691
switched to markdown style headers, link back to FITE page
teauxfu Jul 5, 2025
358f49b
add line breaks for readability, switch to simpler css for image alig…
teauxfu Jul 5, 2025
2912e5a
switch to markdown style headers, set max width on sign up form and c…
teauxfu Jul 5, 2025
3f0ce9f
bold all anchor elements for better link readibility, add underline o…
teauxfu Jul 5, 2025
37e7849
Merge branch 'main' of https://github.com/dsa-ntc/brdsa.github.io int…
teauxfu Jul 23, 2025
24dfcbe
whack files, trying to test new gh action workflow
teauxfu Jul 24, 2025
18d7b99
bump node to 24
teauxfu Jul 24, 2025
2d409d9
update package-lock.json
teauxfu Jul 24, 2025
604ae18
wip
teauxfu Jul 24, 2025
342c9a7
boooo
teauxfu Jul 25, 2025
0005f4f
basic working
teauxfu Jul 25, 2025
c402530
cleanup, finally working as hoped
teauxfu Jul 25, 2025
3f91755
can build!
teauxfu Jul 26, 2025
fefc643
get involved wip
teauxfu Jul 26, 2025
56721cf
svg icons, rss, sitemap
teauxfu Jul 27, 2025
a1dd263
add todos
teauxfu Jul 27, 2025
17e2a94
mais la, pooyie cher
teauxfu Jul 27, 2025
bcc3f8b
woe
teauxfu Jul 27, 2025
1508d8e
wokring
teauxfu Jul 27, 2025
9177b88
Create CNAME
teauxfu Jul 27, 2025
87a88b4
updating docs
teauxfu Jul 27, 2025
341c777
Merge branch 'svelte' of https://github.com/teauxfu/brdsa.github.io i…
teauxfu Jul 27, 2025
35b69cf
tweaking nav links
teauxfu Jul 27, 2025
7af3b09
fix weird title attr
teauxfu Jul 27, 2025
ae00572
frobnicating images
teauxfu Jul 27, 2025
232e628
fite, posts
teauxfu Jul 27, 2025
2c60082
resize, fix
teauxfu Jul 27, 2025
8973a73
fixing meta tags
teauxfu Jul 27, 2025
0773cef
Update README.md
teauxfu Jul 27, 2025
4757ee3
add interest form
teauxfu Jul 27, 2025
47e8f46
Merge branch 'svelte' of https://github.com/teauxfu/brdsa.github.io i…
teauxfu Jul 27, 2025
218777c
add icons for rss, sitemap
teauxfu Jul 27, 2025
caf7ff2
misc theme tweaks
teauxfu Jul 27, 2025
4d00cf1
fix sitemap, rss
teauxfu Jul 27, 2025
dbb1b71
note sk build size
teauxfu Jul 28, 2025
3082e49
misc cleanup
teauxfu Jul 28, 2025
b273675
tinker with actionnetwork embeds
teauxfu Jul 28, 2025
5fb360e
wip add todos from meeting
teauxfu Jul 29, 2025
4e9c0ed
wip fixes
teauxfu Jul 29, 2025
34b6e05
update readme
teauxfu Jul 29, 2025
5779697
notes
teauxfu Jul 29, 2025
a1c805d
readability improvements
teauxfu Jul 29, 2025
b15d4fe
fix opacity
teauxfu Jul 29, 2025
51ec128
swap out fite quote
teauxfu Jul 29, 2025
d82b54f
Update +page.svelte
teauxfu Jul 29, 2025
9e5010c
.
teauxfu Jul 31, 2025
8ed2aec
Merge branch 'svelte' of https://github.com/teauxfu/brdsa.github.io i…
teauxfu Jul 31, 2025
ebd72c6
add reports to gitignore
teauxfu Jul 31, 2025
859ecb2
make svg icons more accessible
teauxfu Jul 31, 2025
68f9334
make link text more descriptive
teauxfu Jul 31, 2025
b787843
defer loading the iframe stuff if possible
teauxfu Jul 31, 2025
85f4f34
linting
teauxfu Jul 31, 2025
70bae0d
remove junk
teauxfu Jul 31, 2025
aa72866
wip
teauxfu Jul 31, 2025
c144a7d
cleanup image and post module loading. add support for hidden posts
teauxfu Jul 31, 2025
ccbcd96
fix for caption wrap
teauxfu Jul 31, 2025
cd49beb
remove logging
teauxfu Jul 31, 2025
d3d2234
fixes for markdown link generation
teauxfu Jul 31, 2025
b153925
tweak width
teauxfu Jul 31, 2025
e04e657
css adjustments
teauxfu Aug 1, 2025
9822137
hide post
teauxfu Aug 1, 2025
7edf5f3
push posts list below interest form
teauxfu Aug 1, 2025
a7c6624
rename our-work route to campaigns for consistency
teauxfu Aug 1, 2025
222fcba
update route in config
teauxfu Aug 1, 2025
a0ddf16
add WAFB link to FITE page
teauxfu Aug 1, 2025
40852e6
renamed route
teauxfu Aug 1, 2025
66fb820
update lighthouse reports
teauxfu Aug 1, 2025
5db27c2
waffling about module loading, trying to get charts in static output …
teauxfu Aug 6, 2025
6cd3ec4
yeah we plottin we schemein
teauxfu Aug 9, 2025
d682357
add basic cookbook
teauxfu Aug 10, 2025
03200a9
cookbook wip 2
teauxfu Aug 10, 2025
816399f
conditional rendering
teauxfu Aug 10, 2025
e65a585
fix titles, add summaries
teauxfu Aug 10, 2025
472f4bd
show recipie metadata on page
teauxfu Aug 10, 2025
9670910
remove echarts
teauxfu Aug 10, 2025
bb28a2d
colors
teauxfu Aug 10, 2025
5c7eda7
wip on chart
teauxfu Aug 10, 2025
ed48e61
frobnicate styles
teauxfu Aug 10, 2025
177ad64
center posts
teauxfu Aug 10, 2025
731f959
update scores, tweak ella image size
teauxfu Aug 10, 2025
1e4acea
update OG tags
teauxfu Aug 10, 2025
67ff12a
linting, cleanup
teauxfu Aug 10, 2025
187a4a3
further frobnication. date handling
teauxfu Aug 10, 2025
b48063c
fix graph scaling
teauxfu Aug 10, 2025
88f6854
edit
teauxfu Aug 10, 2025
1afa168
formatting
teauxfu Aug 10, 2025
096277d
swap out remark for rehype
teauxfu Aug 14, 2025
57d818e
add details css animation
teauxfu Aug 14, 2025
aecf721
add bylaws
teauxfu Aug 14, 2025
1cd3e98
fix toc
teauxfu Aug 14, 2025
7864a13
update readme
teauxfu Aug 15, 2025
270e886
Update README.md
teauxfu Aug 16, 2025
ea8ed30
update fite, donation page
teauxfu Aug 24, 2025
b9a0a45
Merge branch 'svelte' of https://github.com/teauxfu/brdsa.github.io i…
teauxfu Aug 24, 2025
a2438cc
resources page
teauxfu Aug 24, 2025
252de58
fix link
teauxfu Aug 24, 2025
b398421
center
teauxfu Aug 24, 2025
c10c73d
edit caption
teauxfu Aug 24, 2025
e19871e
show post
teauxfu Aug 24, 2025
4e1c6ad
swap out logo
teauxfu Aug 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: svelte deploy gh pages

on:
push:
branches: ['svelte']
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Build the code
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
46 changes: 20 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# borrowed from
# https://github.com/github/gitignore.git
node_modules

# Jekyll.gitignore
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build
/reports

# Ruby.gitignore
*.gem
*.rbc
/.bundle/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
Gemfile.lock
.ruby-version
.ruby-gemset
# OS
.DS_Store
Thumbs.db

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
# Env
.env
.env.*
!.env.example
!.env.test

# Node.gitignore
node_modules/
npm-debug.log*
package-lock.json

# Editor generated files
.vscode
*.swp
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
added at the advice of https://svelte.dev/docs/kit/adapter-static#GitHub-Pages
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb

# Miscellaneous
/static/
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"useTabs": true,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
],
"tailwindStylesheet": "./src/app.css"
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations":[
"bradlc.vscode-tailwindcss",
"svelte.svelte-vscode",
"yzhang.markdown-all-in-one",

],
}
45 changes: 45 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// editor tweaks
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120,
"editor.rulers": [120],
// show files before folders for consistency
"explorer.sortOrder": "filesFirst",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"+layout.svelte": "+layout.server.ts,+layout.server.js,+layout.ts,+layout.js,+layout.gql",
"+page.svelte": "+page.server.ts,+page.server.js,+page.ts,+page.js,+page.gql"
},
"files.associations": {
"*.svx": "markdown",
"*.css": "tailwindcss"
},
// custom tab colors
"workbench.editor.customLabels.patterns": {
// Page
"**/routes/**/*/+page.svelte": "${dirname} ❱ page",
"**/routes/+page.svelte": "/ ❱ page",
// Layout
"**/routes/**/*/+layout.svelte": "${dirname} ❱ layout",
"**/routes/+layout.svelte": "/ ❱ layout",
// Page Data
"**/routes/**/*/+page.[tj]s": "${dirname} ❱ page",
"**/routes/+page.[tj]s": "/ ❱ page",
// Layout Data
"**/routes/**/*/+layout.[tj]s": "${dirname} ❱ layout",
"**/routes/+layout.[tj]s": "/ ❱ layout",
// Page Server Data
"**/routes/**/*/+page.server.[tj]s": "${dirname} ❱ page.server",
"**/routes/+page.server.[tj]s": "/ ❱ page.server",
// Page Layout Data
"**/routes/**/*/+layout.server.[tj]s": "${dirname} ❱ layout.server",
"**/routes/+layout.server.[tj]s": "/ ❱ layout.server",
// Error Page
"**/routes/**/*/+error.svelte": "${dirname} ❱ error",
"**/routes/+error.svelte": "/ ❱ error",
// Server Endpoint
"**/routes/**/*/+server.[tj]s": "${dirname} ❱ API",
"**/routes/+server.[tj]s": "/ ❱ API"
}
}
30 changes: 0 additions & 30 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
brdsa.org
brdsa.teauxfu.dev
14 changes: 0 additions & 14 deletions Gemfile

This file was deleted.

138 changes: 138 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Dev notes

prereqs:
- node.js
- an editor (preferably VSCode)
- open the workspace file to use its settings. it makes the file explorer easier to use
- installing some of the recommended plugins is optional, but get Svelte and TailWind at least
- the markdown all in one plugin is nice too
- a github account

## Cloning the repo

```
git clone https://github.com/dsa-ntc/brdsa.github.io.git
```

or using the [GitHub CLI](https://cli.github.com/) (it's nice)

```
gh repo clone dsa-ntc/brdsa.github.io
```

Install the dependencies with

```
npm install
```

Run the app

```
npm run dev -- --open
```

Build and preview the app

```
npm run build && npm run preview -- --open
```

Run the Lighthouse tests. Edit URLs to test in `lighthouse.js`.

```
npm run test:lighthouse
```

VSCode is not required, but highly recommended. The suggested settings in `.vscode/settings.json` and `.vscode/extensions.json` were tailored for this project, but are not required. For basic changes or working with Markdown, the online GitHub text editor is probably fine, too.

There shouldn't be too much need for interacting with the TypeScript files, besides maybe `/src/lib/config.ts`.

## Project structure

Here's the docs for the [Svelte markup syntax](https://svelte.dev/docs/svelte/basic-markup).
SvelteKit (the thing that builds our Svelte code into a website) has some strong opinions about the [project layout](https://svelte.dev/docs/kit/project-structure).

They may seem weird at first, but they're nice once they click.

- `src` has the main code
- `app.html` is the root document, and our content gets injected in there
- `app.css` is the root stylesheet
- `lib` holds some TypeScript files that the site uses
- `config.ts` has some settings that affect the site, like it's title, a list of nav links to show in the header, etc.
- `types.ts` has a type definition in it called `PostMetadata` which is what the site expects to show up in the frontmatter of Markdown content
- `posts` holds all the copy in the form of markdown files
- we can freely reuse pieces of text from here around the site
- `routes` is where we define parts of the site by their URL. this is the most Svelte specific part of the project
- basically each folder you make under here is a route, and by convention the files always have the same names like `+page.svelte`
- so we have folders for some important pages that should have their own URL like `brdsa.org/about` or `brdsa.org/donate`
- `blog/[slug]` is a dynamic route that serves all the other content that we don't want to have to explicitly define
- `[slug]` is the next URL segment as defined in the Markdown file's frontmatter `slug` property
- the code in
- `static` is just static stuff that should be served at the site root. `robots.txt`, `favicon.ico` etc.


### GitHub workflow

Copied and modified this person's GH workflow, updated the Node version I think?
https://github.com/khromov/derivault/blob/main/.github/workflows/build.yml

see `.github/deploy.yml`.

### Setting up the blog route

I actually struggled with this a fair bit at first, but it's working now. I don't fully understand some of the more detailed points about JavaScript module loading. The list of posts is served from /api/posts. See postUtils.ts for module loading specifics. Much of the code there was adapted from articles linked below.

### If there's a weird problem

especially if you're getting a weird type error that seems wrong, give a shot just reloading vscode `ctrl shift p` then `developer: reload window`. occassionally the type cache is bad

### Quirks with images

for main content included in a page, we use `enhanced:img` wherever possible, including with a hero image optionall specified in the frontmatter of blog posts. however, it s

### Useful links

action network css examples
https://help.actionnetwork.org/hc/en-us/articles/115005729066-CSS-snippets-for-embed-customization

text contrast checker https://webaim.org/resources/contrastchecker/

sveltekit project structure
https://svelte.dev/docs/kit/project-structure

tailwind container query size reference
note that the standard viewport breakpoints `sm`, `md`, `lg`, `xl`, and `2xl` are different lengths from the container query breakpoints `@sm`, `@md`, `@lg`,
https://tailwindcss.com/docs/responsive-design#working-mobile-first
https://tailwindcss.com/docs/responsive-design#container-size-reference

how to debug your code
https://svelte.dev/docs/kit/debugging#Visual-Studio-Code

general guidance for project layout (maybe outdated)
https://joyofcode.xyz/sveltekit-markdown-blog#rendering-a-single-post

some default settings to put in `.vscode`
https://www.sveltepatterns.dev/getting-started-with-vscode


### credits

excellent project setup guides, basic plumbing
https://mli.puffinsystems.com/blog/sveltekit-blog-docs-with-mdsvex
https://github.com/mvasigh/sveltekit-mdsvex-blog/tree/main
https://github.com/josh-collinsworth/sveltekit-blog-starter

phenomenal guide, can probably ditch the mdsvex if it's excessive or causing problems
https://gebna.gg/blog/blog-from-scratch-using-sveltekit

svg icons
https://simpleicons.org/?q=github
https://tabler.io/icons
https://heroicons.com/

underline animation
https://cssf1.com/how-to/create-hover-underline-animation-tailwind-css

details/summary animation
https://www.youtube.com/watch?v=Vzj3jSUbMtI
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading