-
Notifications
You must be signed in to change notification settings - Fork 161
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
[ENH] Link to filename element definitions in filename templates #1228
Conversation
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.
OMG. This looks amazing already.
Definitely worth trying to make this last bit work I think (no pressure)
Technically we could also link to the suffixes, right? |
Yes, ultimately I'd like to link to the (1) entities, (2) datatypes, (3) entity value formats (index vs. label vs. enum), (4) suffixes, and (5) extensions. Adding in new links won't be too hard, so once I actually have the links working I'll add a whole bunch of other ones. |
Co-authored-by: Chris Markiewicz <[email protected]>
It seems to be working, and it is GLORIOUS!! |
amazing 👏 🚀 |
can you selectively switch this behavior off for the pdf build? |
make_filename_template
.
@sappelhoff I have refactored things a bit to toggle the formatting based on a new function argument ( |
Co-authored-by: Chris Markiewicz <[email protected]>
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.
Great work @tsalo
Co-authored-by: Chris Markiewicz <[email protected]>
Thanks @tsalo! |
Uh oh, it looks like the new links don't point to the specific language and version. They were fine in the CI build, but I guess that this specific issue wasn't covered. So instead of: https://bids-specification.readthedocs.io/en/latest/99-appendices/09-entities.html#sub Links go to: https://bids-specification.readthedocs.io/99-appendices/09-entities.html#sub |
This seems to be the relevant part of the mkdocs documentation: https://www.mkdocs.org/user-guide/writing-your-docs/#linking-from-raw-html. Unfortunately, I still don't know how to "manually format the link appropriately". |
We can't. We'll need to figure out the SPEC_ROOT stuff. |
I think I have SPEC_ROOT rendering correctly. I assumed that the problem was more complicated than it seems to be. |
Closes None, but will help with #612.
Changes proposed:
task
entity, that portion of the filename template will link to thetask
entity definition in the Entities appendix page.This feels really close. The problem is that the paths aren't working properly.Basically, hrefs likeSPEC_ROOT/99-appendices/09-entities.md#subject
are resolving to https://bids-specification--1228.org.readthedocs.build/en/1228/04-modality-specific-files/99-appendices/09-entities.md#subject. Note the04-modality-specific-files
.