Skip to content
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

Add CONTRIBUTING.md with blog post creation instructions #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to the Spyder Website

1. Create a fork of the repository
2. Clone it and create a new branch for your changes
3. Install dependencies with `npm install`

## Creating a Blog Post

1. If the blog post author(s) haven't been added yet:
1. Create a new folder in `static/assets/authors` using a simple identifier (no spaces/special characters)
2. Inside this folder:
- Add a square avatar image (recommended: 512×512px WEBP)
- Create `metadata.json` with:
```json
{
"name": "Author's Display Name",
"image": "filename.webp"
}
```

2. Create a blog post folder in `src/routes/blog` (name becomes URL slug - lowercase, no spaces)

3. Add a `+page.md` file with this frontmatter:
```yaml
---
title: Blog Post Title # Required
author: author-id # Required. For multiple authors, use an array of identifiers
pub_date: YYYY-MM-DD # Required
category: Category Name # Optional
tags: Tag1, Tag2 # Optional
summary: Concise overview of content # Required
---
```

5. Write content using mdsvex Markdown:
- [Never indent code blocks](https://mdsvex.pngwn.io/docs#limitations)
- Use standard Markdown syntax for formatting

6. For images:
```markdown
![Meaningful description](image.webp "Optional caption")
```
- Store images in the post's folder
- All images require *descriptive* alt text (avoid "image of...", "picture of...", "photo of...", etc.)

7. Preview locally with:
```bash
npm run dev
```
- Verify post appears at `/blog/`
- Check author metadata and image display

8. There is no need to build for production, the workflow will run the build on GitHub Actions.

9. Create PR against upstream `main` branch.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Minimal static [SvelteKit](https://kit.svelte.dev/) set-up made deployable to [GitHub Pages](https://metonym.github.io/sveltekit-gh-pages/). Based on [sveltekit-gh-pages](https://metonym.github.io/sveltekit-gh-pages/)

- Made with Svelte 4
- PostCSS framework provided by [TailwindCSS](https://tailwindcss.com/)
- Icons from the [Svelte Icons Pack](https://leshak.github.io/svelte-icons-pack/)
- Markdown files processed with [mdsvex](https://mdsvex.pngwn.io/)
Expand Down Expand Up @@ -35,3 +36,7 @@ npm run preview
```

And preview your built site at [https://localhost:5174](https://localhost:5174)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)