Skip to content

URL Strategies

eziwiki can express your pages' URLs in one of two ways. Set it once in payload/config.ts:

typescript
global: {
  urlStrategy: 'path',  // or 'hash'
}

path β€” readable URLs (default)#

URLs mirror the content tree:

text
content/getting-started/quick-start.md  β†’  /getting-started/quick-start
content/intro.md                        β†’  /intro

Readers can tell where a link goes before clicking it, search engines can index the structure, and a URL pasted into chat carries meaning on its own.

Use this unless you have a specific reason not to.

hash β€” opaque URLs#

Each path is hashed into a stable, meaningless segment:

text
content/getting-started/quick-start.md  β†’  /a3f2e9d1-4b8c7e6f-9d2a1b3c
content/intro.md                        β†’  /c432b372-e0e30267-e65e26a1

The hash is a SHA-256 digest of the content path, so it is deterministic: the same file yields the same URL on every build, and links stay valid as long as the file does not move.

What this buys you#

Someone who has one URL cannot guess another, and cannot infer your content structure from the address bar.

What it costs you#

  • SEO β€” search engines can crawl the pages, but the URL contributes nothing
  • Shareability β€” nobody can read a link and know where it leads
  • Trust β€” an opaque URL looks like a tracking link to a cautious reader

This is obscurity, not security. Every page is still a public file in your static export; a hash keeps a URL unguessable, not private. To keep something genuinely non-public, do not publish it.

Write ordinary content paths in Markdown. They are resolved at build time under whichever strategy is active, so the same source works either way:

markdown
See the [Quick Start](/getting-started/quick-start).

The same applies to wiki links:

markdown
See [[quick-start]].

Both come out as /getting-started/quick-start under path, and as the matching hash under hash.

Links that resolve to no page are left exactly as written β€” so a typo shows up as a broken link rather than silently pointing at the home page. Run [[validation-testing|npm run check:links]] to find them.

Seeing every URL#

bash
npm run show-urls
text
πŸ“‹ Page URLs  (strategy: path)
================================================================================
πŸ“„ Quick Start
   source β†’ content/getting-started/quick-start.md
   url    β†’ https://eziwiki.vercel.app/getting-started/quick-start

πŸ”’ [HIDDEN] Secret Demo Page
   source β†’ content/secret-demo.md
   url    β†’ https://eziwiki.vercel.app/secret-demo

This is the fastest way to find the address of a hidden page.

Switching strategies#

Changing urlStrategy changes every URL on the site. Existing links, bookmarks, and search rankings will break. If your site is already published, treat it as a migration rather than a setting.

Next#

  • Hidden Pages β€” pages that build and resolve but stay unlisted
  • Search β€” find any page by its contents

Connected to 6 pages

Payload ConfigurationURL StrategiesWelcome to eziwikiSearchWiki LinksHidden PagesDark Mode