3 ms·
The readfile shortcode was added because this sort of code inclusion was used previously and when converting the documentation I needed something with similar s
by ognarb 6y ago
The readfile shortcode was added because this sort of code inclusion was used previously and when converting the documentation I needed something with similar semantic. Another advantage is that it allows me to have a compilable code examples that can be easily downloaded using gitlab support for creating zip from directories[0].
More interesting are the doxysnippet shortcode[1] that provides the extraction from the source code or the custom rendering of links[2] that allows this sort of markdown links: [Overlay](docs:kirigami2;OverlayDrawer)
[0]: https://invent.kde.org/documentation/develop-kde-org/-/archive/developement/develop-kde-org-developement.zip?path=content/docs/getting-started/commandline https://invent.kde.org/documentation/develop-kde-org/-/archi...
[1]: https://invent.kde.org/documentation/develop-kde-org/-/blob/developement/layouts/shortcodes/doxysnippet.html https://invent.kde.org/documentation/develop-kde-org/-/blob/...
[2]: https://invent.kde.org/documentation/develop-kde-org/-/blob/developement/layouts/docs/_markup/render-link.html https://invent.kde.org/documentation/develop-kde-org/-/blob/...