From 77b4d52a85c88031b8d876332a157cf528b9890f Mon Sep 17 00:00:00 2001 From: conradolandia Date: Mon, 10 Feb 2025 20:57:45 -0500 Subject: [PATCH] Add CONTRIBUTING.md with blog post creation instructions and edit README to add a reference to it --- CONTRIBUTING.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 60 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..a3cf25a4 --- /dev/null +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index 2618c94c..013cbd79 100644 --- a/README.md +++ b/README.md @@ -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/) @@ -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)