Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add :contentbasename permalink token #13382

Closed

Conversation

hacdias
Copy link
Contributor

@hacdias hacdias commented Feb 12, 2025

Adds changes described in #11722 (comment), except for the deprecation of :filename.

Comment on lines 49 to 50
{"/:contentbasename/", true, "/index/"}, // Content base name
{"/:contentbasenameorslug/", true, "/index/"}, // Content base name or slug
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that, for the test files, the component is not defined for paths, meaning that here we just get the filename (without extension) instead of the parent file's name as we'd get inside the content directory.

@hacdias hacdias force-pushed the feat/add-contentbasename-token branch 2 times, most recently from cfc6d65 to 5c0cbfe Compare February 12, 2025 13:13
@hacdias
Copy link
Contributor Author

hacdias commented Feb 12, 2025

Tests seem to be failing with unrelated errors:

ERROR Unable to get remote resource: https://gohugo.io/img/hugo.png

@bep bep force-pushed the feat/add-contentbasename-token branch from 5c0cbfe to 0700e01 Compare February 12, 2025 21:37
hacdias and others added 3 commits February 14, 2025 10:29
`:contentbasename`:

1. ContentBaseName
2. Slug or title

`:slugorcontentbasename`:

1. Slug
2. ContentBaseName
3. Title

Closes #11722
@bep bep force-pushed the feat/add-contentbasename-token branch from 0700e01 to 241a9f7 Compare February 14, 2025 09:56
bep added 2 commits February 14, 2025 15:09
`:contentbasename`:

1. ContentBaseName
2. Slug or title

`:slugorcontentbasename`:

1. Slug
2. ContentBaseName
3. Title

Closes #11722
@bep
Copy link
Member

bep commented Feb 15, 2025

I will wrap this up in #/13402

@bep bep closed this Feb 15, 2025
@hacdias hacdias deleted the feat/add-contentbasename-token branch February 16, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants