ITADN

[RFC] File import

#39Closedfederico-razzoli 创建于 2026-01-16
### Problem We have multiple lists, intended for different audiences. I don't think we should change this: our lists are long, and pre-filtering contents that are not for you is a good feature. But we have sections that are repeated across different lists. For example, everyone potentially needs GUIs. This is hard to maintain. It would also be good to include a complete list of all resources, but it would make maintenance even harder. ### The missing solution A normal wiki (like the glorious previous version of the KB) would allow us to inclusions a file into another. In this way we would have a single file (in a directory) for the GUIs, and we could include it in all other lists. But GitHub's Markdown does not support file inclusions. ### Proposal: Home-made file inclusion GitHub's Markdown supports comments, using the same syntax as HTML comments. We can use them as placeholders for contents to include. Pleaseholders will have a start and an end, just like HTML tags: ``` ## GUIs <!-- INCLUDE guis.md --> <!-- END INCLUDE --> ``` We can have a Python script that looks for these placeholders and adds the content between them. If content is already present, it will be replaced (because it might be an older version). The source contents are expected to be in a directory called `inc/`. In the example above: `inc/guis.md`. The script will be called like this: ``` # Include all contents in all lists ./include.py # Look for the specified sections in all lists, # and replaces their contents ./include.py --section guis monitoring ``` We'll run the script locally before a commit that affects included contents. ### Question Is this worth the effort? (It won't be a huge effort, but I think I need to ask this question, since the work on this repository is sponsored by the MariaDB Foundation)
关闭于 2026-02-22 1 条评论