Skip to content

Permanent links

Problem: Links in Starlight (and autogenerated sidebar) connected to the path of file. But in case of digital gardens one often moves content around, which results in broken links.

Brainstorming

Redirtects

Every time page moved - add previous version to redirects ↗ section.

Would be even better if those redircets could be specified in frontmatter ↗, like in Hugo ↗.

Bare slugs

For example, if path is some/thing/a.md generate URL like this /a, instead of some/thing/a. This allows to move file to other/a.md without changing URL. We can either:

  • use filename as slug (instead of path)
    • it can be hard to keep names unique
  • or specify slug in frontmatter
    • may feel like double work

Permanent anchors

Anchors also can brake, this is probably less of a problem compared to broken links.

One way is to specify id instead of using slugger ↗, which would allow to change text without changing id:

### My Great Heading {#custom-id}

Conflicting pages

Except content pages, there will be some special pages, like:

  • /recent
    • /recent/[page]
  • /graph
  • /alphabetical
  • /tags
    • /tags/[name]
  • /search
  • etc.