-
Notifications
You must be signed in to change notification settings - Fork 12
[FEAT] Live render #1055
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
[FEAT] Live render #1055
Conversation
|
Can I already try this out, if so how? |
|
Right now you can build the docker image local from this branch. Don't forget to run composer install first. Now you run: 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. |
744a455 to
62e78b3
Compare
|
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 |
|
When I render EXT:form with the current deployed container it renders fine, with this one I get a couple of errors: not sure if that is caused by the different dev-process or the other changes in |
45902bc to
c5ff68a
Compare
730a464 to
b8fd8a0
Compare
|
I think this PR is ready for testing, I would love to get your feedback on the new function. Please not that I created a separate pr #1091 for an extra performance boost for projects with large menu structures. It might be useful to test those together. I have a publication ready for on the website to announce this feature, I will update the documentation later on. So people can learn how to use this new function and what to expect. |
66b474d to
1b399b3
Compare
|
I tested it and it works great! except for the mentioned missing parts (Documentation, README, DDEV ) |
The new `--watch` flag on the run command will help documentation writers to have a "live" rerendering of their documentation. The command will run the normal rendering once, then changes to existing files are detected and will trigger a rerender of the changed file. To speed up the rendering only the changed file is compiled, this might cause issues in the menu. But that should not be an issue as the final result is always based on a full render.
1b399b3 to
0657e82
Compare
This feature will allow documentation writers to have a live reload of there changes.
To test this out check out the this branch:
run the following command:
make vendor docker-buildNow you can run the application using the normal docker command:
docker run --rm -v $(pwd):/project -it typo3-docs:local --config=DocumentationThis will change nothing, if you want to enable watch mode to rerender on changes you can run:
docker run --rm -p 1337:1337 -v $(pwd):/project -it typo3-docs:local --config=Documentation --watchThis will start a local webserver on port
1337, this is available the application will print it to your console.http://localhost:1337
This local webserver will automatically inject the required javascript to enable the hot reload. If you want to see it's enabled you can use the network inspector of your browser to see if there is a request done which returns a
101response which means the connection is promoted to a websocket connection.Todo: