You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an objects.inv.json file for each render documentation artifact. This is great. It allows us to use the intercept legacy_hook permalink tool (see TYPO3GmbH/site-intercept#207).
It has disadvantages though: It only operates on a specific file of only one exact language+version+repository. We cannot use it to iterate on all versions of a rendered artifact.
Thus, we need a central index/database of all deployed documentation repositories. An SQLite database has little dependencies and can handle the amount of data we're having.
We need:
An indexer that reads the objects.inv.json file of a rendered artifact, which writes the metadata into a SQLite database table
Additionally, a cronjob/task that can be run to regenerate ALL existing objects.inv.json files of the docs.typo3.org document root into the database. This can be used if ever the SQLite data gets corrupted, and for the initial creation of this
A script that offers a JSON endpoint API to retrieve specific metadata:
All versions of a specific repository,
all manuals of a specific subdirectory,
all permalinks of a specific version of a specific repository
all permalinks of all versions of a specific repository
all languages of a specific repository
The permalink tool should be adapted to fetch data from the SQLite database (instead of resolving an objects.inv.json file)
The version switch tool needs to be adapted to fetch data from the SQLite database
Database schema
We probably need these tables:
repositories
uid
repository
URL
version
language
permalinks
repositoryUid
anchor
target
This would yield records like:
# Used to lookup repositories and versions
,repositories
,repository, URL, version, language
,1,'render-guides', 'https://docs.typo3.org/other/t3docs/render-guides/main/en-us/', 'main', 'en-us'
,2,'render-guides', 'https://docs.typo3.org/other/t3docs/render-guides/0.19/en-us/', '0.19', 'en-us'
,3,'render-guides', 'https://docs.typo3.org/other/t3docs/render-guides/0.19/de-de/', '0.19', 'de-de'
# Other inventories will use the composer-key as repository name ("georgringer/news")
# Contains all the permalinks
,permalinks
,repositoryUid,anchor,target
,1,'start','/Index.html'
,2,'start','/Index.html'
,3,'start','/Index.html'
,4,'getting-started','/GettingStarted/Index.html'
SELECT p.target
FROM permalinks AS p
JOIN repositories AS r ON r.uid = p.repositoryUid
WHERE r.repository = 'render-guides'
AND r.version = 'stable'
AND r.language = 'en-us'
AND p.anchor = 'start'
We have an objects.inv.json file for each render documentation artifact. This is great. It allows us to use the intercept legacy_hook permalink tool (see TYPO3GmbH/site-intercept#207).
It has disadvantages though: It only operates on a specific file of only one exact language+version+repository. We cannot use it to iterate on all versions of a rendered artifact.
Thus, we need a central index/database of all deployed documentation repositories. An SQLite database has little dependencies and can handle the amount of data we're having.
We need:
Database schema
We probably need these tables:
repositories
uid
repository
URL
version
language
permalinks
repositoryUid
anchor
target
This would yield records like:
Permalink resolving
Link: https://docs.typo3.org/permalink/render-guides:start@stable
Version resolving
Link: https://docs.typo3.org/versions/en-us/render-guides
Details tbd. A lookup should probably still use Symfony Caching for the incoming URL request, needs language/version fallbacks etc.
The text was updated successfully, but these errors were encountered: