-
Notifications
You must be signed in to change notification settings - Fork 7
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
[FEATURE] Add linkToDocs.php helper script #188
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allows to call an "API endpoint" on docs.typo3.org which can redirect to a common intersphinx identifier (like "t3coreapi:caching"). Version dependencies can also be specified. This is possible by looking up a objects.inv.json file inside the resolved directory of the docs.typo3.org server, parse it, search for the index and then forward to the target URI. We do not need an aggregator to merge all possible JSON files into one, because we only need to lookup the specific intersphinx repository destination. Composer dependency 't3docs/typo3-version-handling' is utilized to provide the needed lookup maps between "intersphinx identifier" and actual rendering directory. Example calls: https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3renderguides:available-default-inventories https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@12.4 https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@11.5 https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@main https://intercept.ddev.site/services/linkToDocs.php?shortcode=typo3-cms-seo:introduction@main
legacy_hook/composer.lockPackage changes
Dev Package changes
Settings · Docs · Powered by Private Packagist |
c/o @NeoBlack - as discussed |
andreaskienast
requested changes
Sep 26, 2024
Co-authored-by: Andreas Kienast <akienast@scripting-base.de>
The composer.lock diff comment has been updated to reflect new changes in this PR. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
andreaskienast
approved these changes
Oct 2, 2024
garvinhicking
added a commit
to TYPO3-Documentation/render-guides
that referenced
this pull request
Oct 10, 2024
With TYPO3GmbH/site-intercept#188 we introduced the possibility on docs.typo3.org to forward to interlink shortcodes to the appropriate targets. This server-side script is able to go through all `objects.inv.json` files hosted on the server to parse the proper targets, and then do a HTTP forward to the actual documentation files. This patch implements a new entry block "Shortlink" (because "permalink" is the actual link to the site, and still has value to be displayed as a primary entry) in the popup modal when clicking on a header reference. NOTE: This should be regarded as an "experimental" feature. There may be situations in which the resolution of permalink targets with confvals and filenames and others may not work properly yet. We will need to catch these issues and address them with follow-up patches to either this repository or the site-intercept repository using specific examples.
garvinhicking
added a commit
to garvinhicking/site-intercept
that referenced
this pull request
Oct 11, 2024
andreaskienast
added a commit
that referenced
this pull request
Oct 11, 2024
) * [TASK] Allow linkToDocs to fallback to 'main' for unknown versions Follow-up of #188 * [BUGFIX] linkToDocs drive-by fix of wrong URL hash replacement * [TASK] Declare `MAIN_IDENTIFIER` private --------- Co-authored-by: Andreas Kienast <andreas.kienast@typo3.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows to call an "API endpoint" on docs.typo3.org which can redirect to a common intersphinx identifier (like "t3coreapi:caching").
Version dependencies can also be specified.
This is possible by looking up a objects.inv.json file inside the resolved directory of the docs.typo3.org server, parse it, search for the index and then forward to the target URI.
We do not need an aggregator to merge all possible JSON files into one, because we only need to lookup the specific intersphinx repository destination.
Composer dependency 't3docs/typo3-version-handling' is utilized to provide the needed lookup maps between "intersphinx identifier" and actual rendering directory.
Example calls:
https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3renderguides:available-default-inventories
https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@12.4
https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@11.5
https://intercept.ddev.site/services/linkToDocs.php?shortcode=t3coreapi:caching@main
https://intercept.ddev.site/services/linkToDocs.php?shortcode=typo3-cms-seo:introduction@main