Skip to content
Snippets Groups Projects
Unverified Commit 84511f8b authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

contrib: add script for creating a new edge post (MR 328)

I use this script locally to quickly get a new edge post going. When
run, it prompts for a title, and then creates a new markdown file (using
the current date) with some helpful stuff pre-filled.
parent 746c402e
No related branches found
No related tags found
1 merge request!328contrib: add script for creating a new edge post
Pipeline #210241 passed
......@@ -30,6 +30,10 @@ $ cat >content/blog/2017-12-31-happy-new-year.md << EOF
> EOF
```
#### Edge blog posting
There's a helper script in `contrib/new_edge_post.sh` that can be used to quickly get started with a new pmOS edge blog post.
### Writing responsive content
Use the following custom tags to create responsive sections in the blog posts:
......
#!/bin/sh
read -p 'Enter post title: ' title
short_title="$(echo "$title" | tr -s ' ' '-')"
today="$(date +'%Y-%m-%d')"
filename="content/edge/$today-$short_title.md"
cat << EOF > "$filename"
title: "$title"
date: $today
---
TODO: Briefly describe what the problem is, what causes it, and who (UI, use
case, device, ??) is affected by it.
TODO: Describe any workarounds, fixes, or actions user needs to take
TODO: Include any other useful info, but please keep it short. Edge posts often
communicate things that cause folks some grief/annoyance so keep this in mind.
It's important to respect reader time :)
If you have problems and need help, please
[reach out to us on chat](https://wiki.postmarketos.org/wiki/Matrix_and_IRC)
or
[file a new issue in our bug tracker](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues).
## Related links:
TODO: list relevant links, like to MRs or issues in pmOS gitlab or upstream.
-
-
EOF
[ -n "$EDITOR" ] && "$EDITOR" "$filename"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment