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

Substitute code fragments with include shortcodes #2587

Open
Tracked by #2545
mowies opened this issue Nov 27, 2023 · 6 comments
Open
Tracked by #2545

Substitute code fragments with include shortcodes #2587

mowies opened this issue Nov 27, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Milestone

Comments

@mowies
Copy link
Member

mowies commented Nov 27, 2023

Goal

Replace all code fragments occurring in the documentation with external files that are referenced using the {% include "filename" %}shortcode available in Material for MkDocs.
The new files should be in an assets folder inside the same folder as the docs file that is referencing them.

DoD

  • all code fragments moved to files
  • all references replaced with include shortcodes
  • file are in correct assets folders
@mowies mowies changed the title substitute code fragments with include shortcodes Substitute code fragments with include shortcodes Nov 28, 2023
@mowies mowies added the documentation Improvements or additions to documentation label Nov 28, 2023
@mowies mowies added this to the 0.10 milestone Nov 28, 2023
@mowies mowies moved this to 🎟️ Refined in Keptn Lifecycle Toolkit Nov 28, 2023
@odubajDT odubajDT assigned odubajDT and unassigned odubajDT Nov 29, 2023
@ahmedavid
Copy link
Contributor

ahmedavid commented Dec 3, 2023

@mowies ,Would it be possible to automate this?
for example go through docs and look for

"""yaml
bla
bla
"""

and extract this to a file.

I wrote a quick python script to extract yaml code samples.
Are there other code sample types?

@mowies
Copy link
Member Author

mowies commented Dec 4, 2023

It's definitely possible to automate this, the problem is naming of the files. They should be named in a way that is easily understandable. A few of them will probably also be re-usable in several docs pages.
I don't see an easy way to automate that part.
Any suggestions?

@ahmedavid
Copy link
Contributor

Yes you are right, naming things is the hardest thing in IT. To give meaningful names one needs to be have domain knowledge. I can write a script to extract and replace short codes. Maybe somebody can join to help with naming.

@mowies
Copy link
Member Author

mowies commented Dec 4, 2023

Sure! Just start off with a PR and then somebody else can take over and give meaningful names to things :)

@mowies mowies moved this from 🎟️ Refined to 🏃 In progress in Keptn Lifecycle Toolkit Dec 4, 2023
@ahmedavid
Copy link
Contributor

Hi @mowies, I create a draft pr. Please see if general structure is ok.

@odubajDT
Copy link
Contributor

Author unassigned. More info here #2633 (comment)

@mowies mowies moved this from 🏃 In progress to 🎟️ Refined in Keptn Lifecycle Toolkit Jan 15, 2024
@RealAnna RealAnna added the good first issue Good for newcomers label Jan 31, 2024
@mowies mowies modified the milestones: 0.10, 0.11 Feb 12, 2024
@mowies mowies modified the milestones: 2.0.0-rc.1, 2.1.0 Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
Status: 🎟️ Refined
Development

Successfully merging a pull request may close this issue.

4 participants