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

Test documentation navbar sorting script #956

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

philipandag
Copy link
Contributor

@philipandag philipandag commented Dec 5, 2024

The script can be used to sort specific sections of a text file, like the navbars in documentation.

The script usage:
<script> [file-to-sort] [start-mark] [end-mark]
file-to-sort is mkdocs.yml by default. The start & end marks are #pre-commit-sort-start and #pre-commit-sort-end by default, which can be seen in mkdocs.yml file.

If we would like to use it then it should definitely be added as a pre-commit hook, not as a loose script. I had problems with creating a working pre-commit hook , so I'll push this script as is for now.

Merge after #955, if at all

*EDIT
Turns out the script can be easily run if it's present in the repo locally. I've changed the .pre-commit-config to run it only on the "mkdocs.yml" file and it works fine. It would be better to move it to a different repository, but I haven't figured out how to do that.

@philipandag philipandag requested a review from mkopec December 5, 2024 11:43
Signed-off-by: Filip Gołaś <[email protected]>
@philipandag philipandag force-pushed the test-documentation-navbar-sorting-script branch from 0d08759 to b05dd42 Compare December 5, 2024 12:12
@philipandag philipandag force-pushed the test-documentation-navbar-sorting-script branch from 82dcb09 to 895c730 Compare December 16, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant