Skip to content

Commit 4ccfda1

Browse files
committed
adding copilot instructions
1 parent 8d10935 commit 4ccfda1

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/copilot-instructions.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copilot instructions
2+
3+
## Authoring / editing blog posts
4+
5+
### Formatting
6+
7+
- Add `{: .filepath}` after filenames to get syntax highlighting
8+
- If it makes sense, after a code block or YML snippet, add a file name on the next line: `{: file='/name/of/file.md'}`
9+
- For sample usage/examples, this doesn't make sense
10+
- Always describe the code block
11+
- Add the `{: .nolineno}` under certain code blocks:
12+
- That are 1 line
13+
- Usage examples - not code that needs line-by-line explanation (unless it's a really complex example)
14+
- Command variations - showing different ways to run the same script
15+
- Use `{: .prompt-info }`, `{: .prompt-tip }`, `{: .prompt-warning }`, and `{: .prompt-danger }` for callouts
16+
- Wrap YML snippets with the `{% raw %}` and `{% endraw %}` tags to avoid Liquid parsing issues
17+
- Do not leave any trailing whitespace at the end of lines
18+
19+
### Images
20+
21+
- When including images in a post, always include both light and dark variants
22+
- Always use a caption under the post
23+
- Always include alt text
24+
25+
Here's an example:
26+
27+
```md
28+
![Markdown badges in a GitHub organization's README](markdown-badges-light.png){: .shadow }{: .light }
29+
![Markdown badges in a GitHub organization's README](markdown-badges-dark.png){: .shadow }{: .dark }
30+
_Markdown badges in a GitHub organization's README_
31+
```
32+
33+
### Style
34+
35+
- I typically always have an `## Overview` and `## Summary` section
36+
37+
### Frontmatter
38+
39+
For new posts, always use these frontmatter fields (and in this order):
40+
41+
```yml
42+
---
43+
title: 'GitHub Apps: Configuring the Git Email for Commits'
44+
author: Josh Johanning
45+
date: 2024-11-22 12:00:00 -0600
46+
description: A guide on how to set up the proper Git email address for commits made by your GitHub App to ensure proper commit attribution
47+
categories: [GitHub, Apps]
48+
tags: [GitHub, GitHub Actions, GitHub Apps, GitHub Issues, Git]
49+
media_subpath: /assets/screenshots/2024-11-22-github-apps-commit-email
50+
image:
51+
path: github-app-commit-light.png
52+
width: 100%
53+
height: 100%
54+
alt: A commit from a GitHub app in a GitHub repository with the commit being attributed to the app
55+
---
56+
```
57+
58+
## Documentation
59+
60+
This is the source of truth for other syntax highlighting, formatting, and authoring examples:
61+
62+
- [Text and Typography](https://chirpy.cotes.page/posts/text-and-typography/)
63+
- [Writing a New Post](https://chirpy.cotes.page/posts/write-a-new-post/)

0 commit comments

Comments
 (0)