Skip to content

Commit

Permalink
chore: pull normalising tags section out into own stub
Browse files Browse the repository at this point in the history
  • Loading branch information
carbontwelve committed Jan 27, 2023
1 parent ad2c720 commit 05c1aba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Expand Up @@ -84,10 +84,3 @@ markdownIt.renderer.rules.hashtag_open =

eleventyConfig.setLibrary("md", markdownIt);
```
## Normalising Tags
There is [some discussion](https://github.com/11ty/eleventy/issues/2462) regarding case sensitivity with tags. In my opinion tags should be insensitive to case but also presented in a human way. For example "ToolsAndResources" should become the slug "tools-and-resources" but display as "Tools And Resources". There are of course exceptions to this: "JavaScript" for example is one word and "PHP" should always remain capitalised. There is also the case where "GameDev" and "GameDevelopment" should be considered the same with both linking to the same destination.
These cases make normalising tags for human readability a difficult problem but not insurmountable.
15 changes: 15 additions & 0 deletions content/tutorials/2023-02-03-normalising-tags.md
@@ -0,0 +1,15 @@
---
title: Normalising Tags
tags: ["11ty"]
growthStage: stub
---

## Preface

There is [some discussion](https://github.com/11ty/eleventy/issues/2462) regarding case sensitivity with tags. In my opinion tags should be insensitive to case but also presented in a human way. For example "ToolsAndResources" should become the slug "tools-and-resources" but display as "Tools And Resources". There are of course exceptions to this: "JavaScript" for example is one word and "PHP" should always remain capitalised. There is also the case where "GameDev" and "GameDevelopment" should be considered the same with both linking to the same destination.

These cases make normalising tags for human readability a difficult problem but not insurmountable.

## Todo

This post should be linked to from "How to programmatically add tags to posts".

0 comments on commit 05c1aba

Please sign in to comment.