-
-
Notifications
You must be signed in to change notification settings - Fork 3
update to support descriptions with file links #8
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
base: main
Are you sure you want to change the base?
update to support descriptions with file links #8
Conversation
|
||
```yaml title="mkdocs.yml" | ||
plugins: | ||
- llmstxt: | ||
sections: | ||
Usage documentation: | ||
- index.md | ||
- usage/*.md | ||
index.md: Main documentation page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'd need the dashes here still, no? this doesn't look legal on the next line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So from what I understand:
- if you are using descriptions, this format is correct
- the old format (just a list using dashes) also still works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But here you're using both formats at once, which is invalid: you'd at least need a trailing colon on the next line.
@pawamoy would be great if we can get this merged. Happy to make any additional changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @logan-markewich!
What I'd prefer is that we keep using a list, and support items being either a string or a dict (with a single key/value pair):
sections:
Usage documentation:
- file1.md
- file2.md: Description of file2
This has a few benefits:
- it lets users add descriptions incrementally
- it makes the ordering explicit (in our case dicts would be loaded ordered from Python YAML, but that's not always the case for other languages in which the YAML data could be loaded)
WDYT?
|
||
```yaml title="mkdocs.yml" | ||
plugins: | ||
- llmstxt: | ||
sections: | ||
Usage documentation: | ||
- index.md | ||
- usage/*.md | ||
index.md: Main documentation page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But here you're using both formats at once, which is invalid: you'd at least need a trailing colon on the next line.
This PR adds new config options to provide a description with each page link
Which would generate something like
Added some unit tests, so I think this will work nicely? Open to changes!