Skip to content
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

Use includes our own translation rules for shared code blocks #402

Open
MichaIng opened this issue Mar 15, 2021 · 0 comments
Open

Use includes our own translation rules for shared code blocks #402

MichaIng opened this issue Mar 15, 2021 · 0 comments
Assignees
Labels
meta Topics that do not deal with the actual docs content, e.g. GitHub actions

Comments

@MichaIng
Copy link
Owner

MichaIng commented Mar 15, 2021

E.g. the expandable dietpi-software block on all software pages could be an include file, so changes only need to be done once there. There are other shared blocks, like file server and VPN recommendations on certain software categories. I'll try the general concept out for the mentioned expandable block, and we can keep it in mind and use includes whenever we realise that we double code.

This might help as well with #345 to have a single tab for each type of image, with doubled content, but when using includes the code to maintain would not be doubled. Still, too many options/tabs with too long names might be not good already for the reason that it's not directly clear for novice users which one to select. We discussed that already and found a good middle way, IMO.


Another thing is that it should be possible to define own rules/syntax for the Markdown => HTML translator. I didn't have a closer look into it, but e.g. a [youtube]<videoID>[/youtube] would be awesome to have translated automatically with lazy loading, width, height, feature policy and such. Looks more like BB code, however 😄. Like includes but for dynamic content. Similarly it should be possible to have loading="lazy" applied to images automatically, so that we don't need to add it to the Markdown code, by altering those rules.

@MichaIng MichaIng added the meta Topics that do not deal with the actual docs content, e.g. GitHub actions label Mar 15, 2021
@MichaIng MichaIng self-assigned this Mar 15, 2021
@MichaIng MichaIng changed the title Use includes or own translation rules for shared code blocks Use includes our own translation rules for shared code blocks Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Topics that do not deal with the actual docs content, e.g. GitHub actions
Projects
None yet
Development

No branches or pull requests

1 participant