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

Add option "--header-offset" #467

Open
iptizer opened this issue Aug 13, 2021 · 0 comments
Open

Add option "--header-offset" #467

iptizer opened this issue Aug 13, 2021 · 0 comments

Comments

@iptizer
Copy link

iptizer commented Aug 13, 2021

Is your feature request related to a problem? Please describe.

We are using mkdocs and the generated md should be used as part of our mkdocs documentation.
Thing is, that mkdocs requires a header "first order" for the page name. Everything else has to be 2nd layer or below. Otherwise the index is rendered the wrong way.

Describe the solution you'd like

Add an option --header-offset with default value 0. If set to 1 all headers are offset by one.

Describe alternatives you've considered

Currently we use the following dirtyhack to fix the situation during image build:

RUN sed -i 's/^#### /##### /g' userapi-openapi.md && \ 
    sed -i 's/^### /#### /g' userapi-openapi.md && \
    sed -i 's/^## /### /g' userapi-openapi.md && \
    sed -i 's/^# /## /g' userapi-openapi.md

Additional context

This could also be relevant in case someone wants to add the generated text dynamically in a already present document.

@iptizer iptizer changed the title Add option "header offset" Add option "--header-offset" Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants