HUGO

Raw link works but {{< ref >}} doesn't

I’ve got a snippet that looks like this

You should use a [strong passphrase](/house/password_managers/securing-your-account/#picking-a-good-password-passphrase)

This works. But then I was thinking I should probably use the {{< ref/relfref >}} stuff so I changed the above to

You should use a [strong passphrase]({{< ref "/house/password_managers/securing-your-account/#picking-a-good-password-passphrase" >}})

This didn’t work. It made the error below.

en] REF_NOT_FOUND: Ref "/house/password_managers/securing-your-account/": "/home/me_username/Documents/projects/webby/content/house/password_managers/_index.md:18:42": page not found

My contents folder looks something like below. The snippet is from password_managers/_index.md.

.
├── house
│   ├── hazardous_waste
│   │   ├── hazardous_waste_info.pdf
│   │   └── index.md
│   ├── _index.md
│   ├── password_managers
│   │   ├── _index.md
│   │   ├── MFA Methods Explained.md
│   │   ├── Securing Your Account
│   │   │   ├── index.md
│   │   │   └── password_strength.png
│   └── why.md
├── _index.md
└── search.md

I went ahead and tried with “MFA Methods Explained” but that didn’t work either.

Does work
You should use a [strong passphrase](/house/password_managers/mfa-methods-explained)

Causes compile error
You should use a [strong passphrase]({{< ref "/house/password_managers/mfa-methods-explained" >}})

What’s going on?

You’re looking for “mfa-methods-explained” but the file is named “MFA Methods Explained.md”.

Don’t use spaces or capital letters in your paths.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.