localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Write doc to remove conjunctions from URLs

Open willguv opened this issue 11 months ago • 9 comments

Hi @dedavidson I'm looking at a few D&G improvements which we agreed would be pushed back to LGD at some point

We did some work on url conjunctions - is this easily translatable into a PR for new sites please?

willguv avatar Jan 30 '25 17:01 willguv

Hi again @dedavidson is this something you could create a PR for?

willguv avatar Mar 26 '25 09:03 willguv

I like to leave all the words in URL patterns. I don't like when you create content with a title like "I am using this" and you get a url like /using.

I much prefer a URL that is readable, such as /i-am-using-this (and it's more predictable) (and I think works better for breadcrumbs and other heirarchical nav items, but I could be wrong here - certainly leaving all the words in will do no harm to breadcrumbs/menus/etc)

markconroy avatar Mar 26 '25 19:03 markconroy

@markconroy it removed a few selected words - eg and, the - in line with Gov.uk work

willguv avatar Mar 26 '25 23:03 willguv

For note, here's what we are currently removing:

a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with

If it was my choice, I would not remove any, but happy to go with the consensus.

markconroy avatar Mar 27 '25 08:03 markconroy

@willguv yes will get that done

dedavidson avatar Mar 27 '25 09:03 dedavidson

ignore_words: 'a, an, and, are, as, at, before, but, by, for, from, get, if, is, in, into, it, like, of, off, on, onto, or, per, since, so, than, the, this, that, to, up, via, when, where, with, you'

This is what we changed pathauto.settings.yml to be.

It added and, are, get, if, it, or, so, when, where, you

dedavidson avatar Jun 05 '25 10:06 dedavidson

gov.uk advice: https://insidegovuk.blog.gov.uk/url-standards-for-gov-uk/

Of interest:

  1. These standards apply to the GOV.UK website and its subdomains. Separate standards apply to the wider use of the gov.uk domain, for example by local authorities.

Discussing in Merge Tuesday:

  • @willguv is keen to make this change for new sites.
  • @markconroy is still not keen
  • @andybroomfield uses the defaults from pathauto, and knows where to change it if needed.

@dedavidson where did you get your list of words from? The guidance on https://insidegovuk.blog.gov.uk/url-standards-for-gov-uk/ does not seem to have a full list.

Also, we should document this for councils to be aware of how to change it.

finnlewis avatar Jul 15 '25 11:07 finnlewis

Link from @andybroomfield showing where this is changed /admin/config/search/path/settings

willguv avatar Jul 15 '25 11:07 willguv

@finnlewis the list of additional words came from the work at Dumfries & Galloway.

dedavidson avatar Jul 21 '25 09:07 dedavidson