Is there an easy way to use rel/relref shortcodes to point to a page with a bundle.
bundle-page
├── index.md
For now, the only way which seems to work is {{ ref bundle-page/index.md }}
Would it involve to much risk/work to make the page available to {{< ref bundle-page.md >}}.
I suppose there are very few chances to have a bundle-page/index.md AND a bundle-page.md in the same directory.
This would make sure cross links don’t break across the site if a normal page is suddenly turned into a bundle page.
Really not sure what impact it may have, this is just for reflection.
FWIW, I never found use of refand relref. Links like [click here](/page-bundle) would just work… whether that page is a regular page or a bundle page (assuming ugly URLs are disabled).
Proposal for ref/relref to work for regular or bundle pages
Make specifying the .md extension optional.
Would it be possible to make this work?
{{< ref "page" >}}
The idea is to make that do the right thing whether the user has:
content/
└── page.md
or
content/
└── page.html
or
content/
└── page/
└── index.md
or
content/
└── posts/
└── page.md
If there is ambiguity, then the current style can be used to make things clear:
{{< ref "page.md" >}}
or
{{< ref "page.html" >}}
or
{{< ref "page/index.md" >}}
or
{{< ref "posts/page.md" >}}
@bep Would it be feasible to implement something like this? Should I open a feature request issue for this? This proposal would be backward compatible… as mentioned above… the current style can be used to resolve ambiguity… but the proposed more concise form {{< ref "page" >}} should be good in most situations… and then a user doesn’t have to worry if the referenced page is a regular page or a bundle.
The same proposal applies to relref shortcode too.
No, of course not. They are not the same file. To be clear, you would need to use the current, more verbose style only if the user ended up with this content (that would be very rare, almost never, IMO!):