Naming Conventions - Article or Articles?

What do you recommend as effective naming conventions for my Content Types and Pages?

Here’s an example:
So I create a landing page for all my articles (/articles) from which I can get to any individual article (/articles/brave-new-world). Meanwhile I have a single pages for About and Careers.

How to name everything?

Take a rails like approach and name around the underlying routes:
Articles (For single Article Landing Page)
Article (For the repeating article pages)

Articles Home

Or maybe some other approach.
What naming challenges have you had? How have you addressed them?

Looking for tips before I go and build out my whole site and realise I maybe would have been better to use a different convention with the benefit of hindsight.

Hi Team,

Welcome to the community!

The naming convention that you suggested her is this best way to go in my opinion:

Then for you URL structure you would use the link resolver to create the desired paths.

Here’s an example of how it would work for your use case:

export default function (doc) {
  if (doc.isBroken) {
    return '/not-found'
  if (doc.type === 'articles_home') {
    return `/articles`
  if (doc.type === 'article') {
    return `/articles/${doc.uid}`
  return null

Let me know if this makes sense.


1 Like