compilerla / compiler.la

Compiler's website
https://compiler.la
Apache License 2.0
4 stars 2 forks source link

Fix: convert blog categories to yaml list #210

Closed thekaveman closed 2 months ago

thekaveman commented 2 months ago

The categories key in a blog post's front matter is a list variable -- this PR converts the CSV strings to lists.

Among other things, this allows the feed to display multiple category entries correctly:

See https://deploy-preview-210--compilerla.netlify.app/blog/feed.xml

<entry>
  <title type="html">
    How to support a platform-agnostic engineering team with VS Code Dev Containers
  </title>
  ...
  <category term="compiler"/>
  <category term="engineering"/>
  ...
</entry>

Whereas before this PR, they were parsed incorrectly (extra comma in compiler):

See https://compiler.la/blog/feed.xml

<entry>
  <title type="html">
    How to support a platform-agnostic engineering team with VS Code Dev Containers
  </title>
  ...
  <category term="compiler,"/>
  <category term="engineering"/>
  ...
</entry>
netlify[bot] commented 2 months ago

Deploy Preview for compilerla ready!

Name Link
Latest commit 06fa1e06e584862b4e97772cec53e5edadaa526c
Latest deploy log https://app.netlify.com/sites/compilerla/deploys/667db4617f109d000874c064
Deploy Preview https://deploy-preview-210--compilerla.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

thekaveman commented 2 months ago

FYI @laneymangan for writing blog posts -- the categories in the front matter data should be a list, like:

---
categories:
  - one
  - two
  - three
---

Blog post...

Instead of a comma-separated values string:

---
categories: one, two, three
---

Blog post...
laneymangan commented 2 months ago
  - one
  - two
  - three

Noted! I updated our draft template to reflect this