mdx: remove space in image so that rss feed works (#295)

* mdx: remove space in image so that rss feed works

* README: be more precise regarding images

* github-ci: add check for spaces in path

better to have an automated test than have one of our writer
kill again our RSS feed

* README: small typo
This commit is contained in:
GovanifY 2024-02-05 11:40:35 +00:00 committed by GitHub
parent cb2678db29
commit 6d8bf2c0fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 3 deletions

View File

@ -9,5 +9,18 @@ if len(invalid_images) != 0:
print(img)
exit(1)
print("Found no PNGs, good to go")
invalid_images = glob.glob('blog/**/*.webp', recursive=True)
invalid_images += glob.glob('docs/**/*.webp', recursive=True)
for str in invalid_images:
invalid = False
if ' ' in str:
invalid = True
print("Found space in path: " + str)
if(invalid):
exit(1)
print("Found no PNGs or spaces, good to go")
exit(0)

View File

@ -52,16 +52,20 @@ yarn new-article
The article will go into `/blog/<year>/<title>`
You should add an image to serve as a preview (if appropriate) by using the `image:` frontmatter field, for example:
You should add an image to serve as a preview and title card respectively (if appropriate) by using the `image:` and `titleImage:` frontmatter field, for example:
```yaml
---
title: ...
---
image: ./img/my-cool-thumbnail.webp
titleImage: ./img/my-cool-thumbnail.webp
---
```
`titleImage` assets currently needs to be stored in the static folder.
No image path, whether in the frontMatter or in the article, should contain spaces.
#### Caveats if Migrating a Legacy Article
- When running the command above, you should provide an alias that matches the relative URL from the old website. This will prevent legacy links from becoming dead. See existing articles that have been migrated for an example.

View File

Before

Width:  |  Height:  |  Size: 535 KiB

After

Width:  |  Height:  |  Size: 535 KiB

View File

@ -815,7 +815,7 @@ but that's just a small sacrifice to make.
Merge the Qt branch: Part 2
</PCSX2PRLink>
<Image cols={6} src={require("./img/5221-Qt 2020.webp").default} /> * Image from
<Image cols={6} src={require("./img/5221-Qt-2020.webp").default} /> * Image from
Qt is coming closer and closer to official release.
<PCSX2PRLink authors="stenzek" prNums="5268">