Skip to content

Commit

Permalink
Merge branch 'rust-gamedev:main' into source
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersoulK authored Aug 5, 2024
2 parents 43caf2d + 325de3f commit aeb2ae6
Show file tree
Hide file tree
Showing 129 changed files with 4,587 additions and 1,079 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{md,mkdn}]
trim_trailing_whitespace = false
indent_style = space
1 change: 1 addition & 0 deletions .github/create_newsletter_scaffold.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cp .github/newsletter-template.md index.md
sed -i "s/{{\s*NEWSLETTER_MONTH\s*}}/${NEWSLETTER_MONTH}/g" index.md
sed -i "s/{{\s*NEWSLETTER_YEAR\s*}}/${NEWSLETTER_YEAR}/g" index.md
sed -i "s/{{\s*NEWSLETTER_COUNTER\s*}}/${NEWSLETTER_COUNTER}/g" index.md
sed -i "s/{{\s*NEWSLETTER_COUNTER_NEXT\s*}}/$((NEWSLETTER_COUNTER + 1))/g" index.md
sed -i "s/{{\s*NEWSLETTER_NEXT_MONTH_NUMBER\s*}}/${NEWSLETTER_NEXT_MONTH_NUMBER}/g" index.md
# Create a dir in content/news with the counter with 3 digits as name
destination="content/news/$(printf "%03d" ${NEWSLETTER_COUNTER})"
Expand Down
30 changes: 25 additions & 5 deletions .github/newsletter-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ but here are the most important rules:
- Only one image per section is allowed.
- The maximum size is 300kb for static images and 2.5mb for GIFs.
- The image should come before the text, and must have alt text for accessibility.
- Prefer static images to GIFs, to keep the page load times down.
- Prefer static images to GIFs/videos, to keep the page load times down.
- To include a video, encode it as `H.264` in an `mp4` container and use
the `video_figure()` shortcode; videos autoplay in a loop (muted).
- Each section should be under 1000 characters, and under 6 paragraphs.
- This only applies to the rendered text, not the markup.
- Keep formatting minimal - no bold/italics/etc.
Expand All @@ -115,8 +117,17 @@ Please use these templates as a starting point:
```md
### [Game name]

![alt text](img)
_optional image label_
{{ image_figure(
alt="image/GIF description",
src="image link",
caption="image caption") }}

OR

{{ video_figure(
type="video/mp4",
src="my-video.mp4",
caption="optional video caption") }}

[Game name] ([GitHub], [Discord], [Twitter]) by [@nickname]
is... {short project description in one sentence}.
Expand All @@ -133,8 +144,17 @@ _Discussions: [/r/rust_gamedev](link), [Twitter](link), [etc](link)_
```md
### [Article name]

![alt text](img)
_optional image label_
{{ image_figure(
alt="image/GIF description",
src="image link",
caption="image caption") }}

OR

{{ video_figure(
type="video/mp4",
src="my-video.mp4",
caption="optional video caption") }}

[@nickname] published an [article] about...
{overview what the resource is about}.
Expand Down
31 changes: 26 additions & 5 deletions .github/newsletter-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,25 @@ Feel free to send PRs about your own projects!
- [Requests for Contribution](#requests-for-contribution)
- [Jobs](#jobs)
- [Bonus](#bonus)
- [Future news](#future-news)

<!--
Ideal section structure is:
```
### [Title]
![image/GIF description](image link)
_image caption_
{{ image_figure(
alt="image/GIF description",
src="image link",
caption="image caption") }}
OR
{{ video_figure(
type="video/mp4",
src="my-video.mp4",
caption="optional video caption") }}
A paragraph or two with a summary and [useful links].
Expand Down Expand Up @@ -112,13 +122,24 @@ useful information -->
<!-- Bonus section to make the newsletter more interesting
and highlight events from the past. -->

## Future news

<!-- Section to get more people involved in writing news. -->

Editing this newsletter wouldn't be possible without [your contributions][news_current_prs].
Thanks to everyone who helped us this month!

If you want something mentioned in the next newsletter, [send us a pull request][pr].

You can also get an early look at pending issues for the [next newsletter][news_future_prs].

[news_current_prs]: https://github.com/rust-gamedev/rust-gamedev.github.io/pulls?q=is%3Apr+in%3Atitle+%27N{{ NEWSLETTER_COUNTER }}%27
[news_future_prs]: https://github.com/rust-gamedev/rust-gamedev.github.io/pulls?q=is%3Apr+in%3Atitle+%27N{{ NEWSLETTER_COUNTER_NEXT }}%27

------

That's all news for today, thanks for reading!

Want something mentioned in the next newsletter?
[Send us a pull request][pr].

Also, subscribe to our socials if you want to receive fresh news!
- X/Twitter: [@rust_gamedev][@x_rust_gamedev]
- Mastodon: [@rust_gamedev][@mastodon_rust_gamedev]
Expand Down
61 changes: 42 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,35 @@ jobs:
runs-on: ubuntu-latest
env:
BASE_URL: https://github.com/getzola/zola/releases/download
VERS: v0.15.2
VERS: v0.19.1
ARCH: x86_64-unknown-linux-gnu
# https://github.com/crazy-max/ghaction-github-pages/issues/1#issuecomment-623202206
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Lint
uses: avto-dev/markdown-lint@v1
with:
args: '.'
config: '.markdownlint.json'
- name: Install Zola
run: |
curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz
echo "Zola version: $(./zola --version)"
- name: Zola build
run: ./zola build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: public

links:
name: Check for Broken Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
- name: Get changed files
id: changed-files
# source: https://stackoverflow.com/a/74268200, added filtering for markdown files
Expand All @@ -29,11 +50,6 @@ jobs:
fi
echo "changed_files: $changed_files"
echo "changed_files=$changed_files" >> $GITHUB_OUTPUT
- name: Lint
uses: avto-dev/markdown-lint@v1
with:
args: '.'
config: '.markdownlint.json'
- name: Check links
uses: lycheeverse/[email protected]
if: ${{ steps.changed-files.outputs.changed_files != '' }}
Expand All @@ -45,16 +61,23 @@ jobs:
--accept '100..=103,200..=299,300..=399'
--exclude '[^\w]todo[^\w]?'
--exclude 'https://(www\.|old\.)?reddit\.com'
--exclude 'https://www.patreon.com'
--exclude 'https://gamedev.social'
--exclude 'dev.epicgames.com'
--exclude-path 'assets/logo/readme.md'
${{ steps.changed-files.outputs.changed_files }}
- name: Install Zola
run: |
curl -L ${BASE_URL}/${VERS}/zola-${VERS}-${ARCH}.tar.gz | tar -xz
echo "Zola version: $(./zola --version)"
- name: Zola build
run: ./zola build
- name: Deploy
if: github.ref == 'refs/heads/source'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: public
target_branch: master
pages:
needs: zola
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
"no-hard-tabs": false,
"hr-style": false,
"strong-style": false,
"emphasis-style": false
"no-bare-urls": false,
"emphasis-style": false,
"no-inline-html": {
"allowed_elements": [
"abbr"
]
}
}
43 changes: 33 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

Thank you for contributing to the newsletter! 💖

- [Writing Newsletter Sections](#writing-newsletter-sections)
- [Templates](#templates)
- [Style Guidelines](#style-guidelines)
- [Becoming an Editor](#becoming-an-editor)
- [Contributing Guide](#contributing-guide)
- [Writing Newsletter Sections](#writing-newsletter-sections)
- [Templates](#templates)
- [Games, Apps or Libraries](#games-apps-or-libraries)
- [Articles, Blog Posts or Videos](#articles-blog-posts-or-videos)
- [Style Guidelines](#style-guidelines)
- [Becoming an Editor](#becoming-an-editor)

## Writing Newsletter Sections

Expand Down Expand Up @@ -53,8 +56,17 @@ your GitHub notifications for any further review comments from the editors.
```md
### [Game name]

![alt text](img)
_optional image label_
{{ image_figure(
alt="image/GIF description",
src="image link",
caption="image caption") }}

OR

{{ video_figure(
type="video/mp4",
src="my-video.mp4",
caption="optional video caption") }}

[Game name] ([GitHub], [Discord], [Twitter]) by [@nickname]
is... {short project description in one sentence}.
Expand All @@ -71,8 +83,17 @@ _Discussions: [/r/rust_gamedev](link), [Twitter](link), [etc](link)_
```md
### [Article name]

![alt text](img)
_optional image label_
{{ image_figure(
alt="image/GIF description",
src="image link",
caption="image caption") }}

OR

{{ video_figure(
type="video/mp4",
src="my-video.mp4",
caption="optional video caption") }}

[@nickname] published an [article] about...
{overview what the resource is about}.
Expand All @@ -96,11 +117,13 @@ _Discussions: [/r/rust_gamedev](link), [Twitter](link), [etc](link)_
- Avoid having multiple/nested bullet points.
- This guideline may be relaxed if your project has multiple parts that
aren't independent enough for their own sections.
- Only include one image (<300kb) or GIF (<2.5mb).
- Only include one image (<300kb), GIF (<2.5mb) or video (<2.5mb).
- Images should be placed before text, with an optional caption and
mandatory alternate text for accessibility.
- Unless essential to demonstrating your project, prefer static images
over GIFs, to keep the file size down.
over GIFs/videos, to keep the file size down.
- To include a video, encode it as `H.264` in an `mp4` container and use
the `video_figure()` shortcode; videos autoplay in a loop (muted).
- Use singular 'they' if you’re not sure what someone's pronouns are.
- If a project has been featured in previous newsletters, try to focus on
what's new rather than repeating previous content.
Expand Down
Loading

0 comments on commit aeb2ae6

Please sign in to comment.