Gatsby-theme-novela: default example post capitalizes slug

Created on 9 Mar 2020  路  5Comments  路  Source: narative/gatsby-theme-novela

Prerequisites

  • [x] Have you searched the issue tracker for similar issues (either past or present)?
  • [x] Can you reproduce the issue consistently?
  • [x] Are you reporting to the correct repository?
  • [ ] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.

Description

Version of Novela you are using

latest

Number of posts you have and which data source

  • 1 Local
  • [ ] Contentful

Describe the bug

The default install has a page titled "My first post using Novela by Narative" which produces the URL:
http://localhost:8000/My-first-post-using-Novela-by-Narative
In general, especially for SEO, all characters for URLs should be lower cased.

Expected behavior

All lower case URLs

I tried to fix by .toLowerCase() everywhere I saw anything about slug, but didn't work.

bug

All 5 comments

On further testing, I found editing the title of the demo post's yaml in gatsby develop the URL slug does properly change to lower case. Restoring the title back to "My first post using Novela by Narative" will present a new lower case slug as well.

Strange the initial URL is mixed case.

I'm also seeing all posts with mixed-case slugs.

I've also found out this behavior annoying, so I'm manually providing lowercase slugs for all my posts.

It's particularly painful when hosting on netlify, as it lowercases any url.
https://community.netlify.com/t/my-url-paths-are-forced-into-lowercase/1659

So you navigate to a mixed-case slug, netlify redirects you to lowercase, and on hydration mixed case comes back. This produces a weird feeling for the end user.

cheers @dsteenman

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KrisBraun picture KrisBraun  路  4Comments

sw-yx picture sw-yx  路  3Comments

slorber picture slorber  路  3Comments

zactony picture zactony  路  3Comments

jorgeorejas picture jorgeorejas  路  3Comments