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

Add a trailing slash to feed URLs if trailingSlash is enabled #9829

Closed
2 tasks done
ilg-ul opened this issue Feb 6, 2024 · 1 comment · Fixed by #9920
Closed
2 tasks done

Add a trailing slash to feed URLs if trailingSlash is enabled #9829

ilg-ul opened this issue Feb 6, 2024 · 1 comment · Fixed by #9920
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@ilg-ul
Copy link
Contributor

ilg-ul commented Feb 6, 2024

Have you read the Contributing Guidelines on issues?

Description

Add the trailing slash to URLs generated in the feed files.

Has this been requested on Canny?

No response

Motivation

The trailingSlash configuration is available to customise the presence/absence of a trailing slash at the end of URLs; unfortunately this setting does not apply to the links generated in the feed files, and tools like Algolia that use the feed files may behave unusual.

API design

Call the applyTrailingSlash function conditionally to adjust the URLs generated in the feed files.

Have you tried building it?

The functionality is implemented in cronica-it@35fef96.

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@ilg-ul ilg-ul added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Feb 6, 2024
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Feb 8, 2024
@slorber
Copy link
Collaborator

slorber commented Feb 8, 2024

👍 looks like a good change to me

I'd prefer if the blogPostAbsoluteUrl variable had the trailing slash, applying it as early as possible is better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants