Skip to content

Conversation

jaapio
Copy link
Contributor

@jaapio jaapio commented Sep 12, 2025

This feature will allow documentation writers to have a live reload of there changes.

Other than what we did before we do now a full overwrite of the run command.
This allows us to remove a number of less optimal constructions in the command.
The change itself is empowered by the changes in phpdocumentor/guides-cli 1.9 which
now provides a number of helper classes to simplify self build run commands.
@linawolf
Copy link
Member

Can I already try this out, if so how?

@jaapio
Copy link
Contributor Author

jaapio commented Sep 13, 2025

Right now you can build the docker image local from this branch. Don't forget to run composer install first.

Now you run: docker run -it --rm --user $(id -u):$(id -g) -v${PWD}:/project -p 1337:1337 typo3-docs:local --watch

When you visit http://localhost:1337/Index.html you should see your documentation. If you edit your index.rst file you should see that the rendering starts again and when finished your browser page reloads.

To stop the server again you can press CTRL+c.

Right now this branch does not contain any method to disable the behavior to start the dev server. This will be added in a later commit.

@garvinhicking
Copy link
Contributor

Just to add to our slack discussion: I now tried this just with "make docker-build" and then your docker run command. This works for me on a basic level. However I for example renamed an anchor inside one file, then the rendering caught that on and spewed out dozens of pages of "dupllicate anchors":

I did that with the TYPO3 EXT:form extension: https://gist.github.com/garvinhicking/ee3a65890ad5a8ff85c32d328a82c30b

@garvinhicking
Copy link
Contributor

When I render EXT:form with the current deployed container it renders fine, with this one I get a couple of errors:

Parsing: 117/117 [=] 100% Parsed 117 files in 1.77 seconds
Rendering:   7/117 [>]   5% Output format html: Rendering: //D/FormEditor/Index.html
[2025-09-19T17:57:13.983933+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformiscreatedevent" (apireference-formeditor-events-beforeformiscreatedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformiscreatedevent","value":"BeforeFormIsCreatedEvent","linkType":"std:label","interlinkDomain":"typo3/cms-form"} []
[2025-09-19T17:57:13.984571+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformissavedevent" (apireference-formeditor-events-beforeformissavedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformissavedevent","
Rendering: 117/117 [=] 100% Output format html: Rendered 117 documents in 1.39 seconds
[2025-09-19T17:57:14.806356+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformiscreatedevent" (apireference-formeditor-events-beforeformiscreatedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformiscreatedevent","value":"BeforeFormIsCreatedEvent","linkType":"std:label","interlinkDomain":"typo3/cms-form"} []
[2025-09-19T17:57:14.806413+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformiscreatedevent" (apireference-formeditor-events-beforeformiscreatedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformiscreatedevent","value":"BeforeFormIsCreatedEvent","linkType":"std:label","interlinkDomain":"typo3/cms-form"} []
[2025-09-19T17:57:14.806457+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformissavedevent" (apireference-formeditor-events-beforeformissavedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformissavedevent","value":"BeforeFormIsSavedEvent","linkType":"std:label","interlinkDomain":"typo3/cms-form"} []
[2025-09-19T17:57:14.806490+00:00] app.WARNING: Inventory link with key "typo3/cms-form:apireference-formeditor-events-beforeformissavedevent" (apireference-formeditor-events-beforeformissavedevent) not found.  {"rst-file":"D/FormEditor/Index","type":"ref","targetReference":"apireference-formeditor-events-beforeformissavedevent","
Rendering: 117/117 [=] 100% Output format html: Rendered 117 documents in 1.95 seconds
Rendering: 117/117 [=] 100% Output format singlepage: Rendered 117 documents in 0.57 seconds
Rendering: 117/117 [=] 100% Output format interlink: Rendered 117 documents in 0.01 seconds
Successfully placed 117 rendered HTML, SINGLEPAGE, and INTERLINK files into /project/Documentation-GENERATED-temp
Server running at http://localhost:1337
Press Ctrl+C to stop the server

not sure if that is caused by the different dev-process or the other changes in guides?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants