Skip to content

Replace {version} in URLs #149

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

Merged

Conversation

alamirault
Copy link
Contributor

In order to make link on symfony codebase, even if is not a class or a method reference

Can be usefull in this case for example symfony/symfony-docs#17902

@javiereguiluz
Copy link
Collaborator

Antoine, thanks for updating the implementation of this PR.

I've reviewed it and it looks great to me 👍

I only have a question ... I don't remember the details, but in symfony.com we build Symfony Docs and other docs different from Symfony (Cloud docs, bundles docs, etc.). So, what would happen if we use {version} in those docs? Do we have in this docs-builder app the concept of doc "version" instead of or in addition to "Symfony version"? Thanks!

@alamirault
Copy link
Contributor Author

Version is set with BuildConfig. I think each docs have specific value ?

https://github.com/symfony/symfony-docs/blob/43325d00d96ad51af2f90b61cb43e47b5918f450/_build/build.php#L22-L23

Maybe I have to rename {version} to {symfonyVersion} ?

Or introduce substitution config in BuildConfig, but I think it's overkill for now

@javiereguiluz
Copy link
Collaborator

Maybe I have to rename {version} to {symfonyVersion} ?

No ... my question was exactly about that ... if {version} is always "the version of the doc being rendered" ... that's perfect because this feature would work for ALL docs, and not ONLY for Symfony Docs.

@alamirault
Copy link
Contributor Author

Maybe I have to rename {version} to {symfonyVersion} ?

No ... my question was exactly about that ... if {version} is always "the version of the doc being rendered" ... that's perfect because this feature would work for ALL docs, and not ONLY for Symfony Docs.

It's always value of ->setSymfonyVersion() setter

@OskarStark
Copy link
Contributor

OskarStark commented Mar 8, 2023

It's always value of ->setSymfonyVersion() setter

And that makes sense, the other docs should use absolute URLS.

@alamirault can you please rename the the PR title accordingly? I think it does not match the current PR content anymore

@alamirault alamirault changed the title Add file reference Replace {version} in URLs Mar 8, 2023
@alamirault
Copy link
Contributor Author

Title updated

@OskarStark
Copy link
Contributor

@weaverryan can you please merge and release this feature?

@javiereguiluz javiereguiluz force-pushed the feature/add-file-reference branch from b725fba to 3d54708 Compare March 23, 2023 08:48
@javiereguiluz
Copy link
Collaborator

Thanks Antoine for working on this feature, this is much appreciated.

@javiereguiluz javiereguiluz merged commit 544f4bd into symfony-tools:main Mar 23, 2023
@javiereguiluz
Copy link
Collaborator

Tagged and released as v0.20.0: https://github.com/symfony-tools/docs-builder/releases/tag/v0.20.0

@alamirault alamirault deleted the feature/add-file-reference branch March 23, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants