From 9cb55c7f65fd2f19459e24f0d9f2fba6071c491c Mon Sep 17 00:00:00 2001 From: Joseph Hale Date: Thu, 9 May 2024 00:55:32 -0700 Subject: [PATCH] doc: Add CONTRIBUTING guide Explain to others, including future me, how to add new announcements easily. --- CONTRIBUTING.md | 23 +++++++++++++++++++++++ Makefile | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 Makefile diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b9825e2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +## Adding a new announcement + +1. Choose a title for your announcement in [kebab-case](https://developer.mozilla.org/en-US/docs/Glossary/Kebab_case) (e.g. `my-custom-announcement`) +2. Scaffold the new announcement using `make announcement title=my-custom-announcement` +3. Add your announcement details to `content/my-custom-announcement/index.md`, + without modifying the front matter. +4. Create and add a `badge.svg` to the announcement's folder. + - NOTE: Hopefully this will be auto-generated someday, but for now it's still + manual. + + +## Creating an announcement badge + +1. Make a copy of an existing badge +2. Edit the text to the new announcement + - Use the standard `Sans` font, size 10, bold face + - Resize the gray bounding box to look nice (e.g. a few pixels of padding on + the left/right) +3. Convert the text to a path +4. Minify the SVG + +> NOTE: I like to use [Inkscape](https://inkscape.org/) to edit the SVGs. For +> minification I use the [`jock.svg` VS Code extension](https://marketplace.visualstudio.com/items?itemName=jock.svg). \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9277d8d --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +.PHONY: all + +title ?= my-announcement + +announcement: + hugo new content $(title)/index.md \ No newline at end of file -- 2.51.2