Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs: [RFC] Configuring File Name from Block Meta #230
base: main
Are you sure you want to change the base?
docs: [RFC] Configuring File Name from Block Meta #230
Changes from 1 commit
31a8106
7da2410
86b721c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
cc @Josh-Cena from #208 - this looks like something you might have context / opinions on? 😄
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.
Mmm, I don't know much outside of Docusaurus/MDN markdown, and the two projects have exactly disjoint sets of meta attributes...
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.
Looks like most of the linked examples actually use
filename
. Which ones usetitle
?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.
Docusaurus does.
I'll also note that I've since learned about Expressive Code through Astro Starlight. It uses
title
as a manual prop name: https://expressive-code.com/key-features/code-component/#titleThere 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.
Given that, I don't think using
title
is a good idea.filename
seems like a safer choice. We could also doeslint-filename
as a completely safe choice, assuming no Markdown parser will balk at unknown attributes.(We could also use
filename
unlesseslint-filename
is present.)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.
I don't follow. Docusaurus is by far the most popular solution out of these. Is there a reason you're not fond of
title
for safety?Personally, I actually do think
filename
makes more sense as a technical descriptor. "Title" to me reads as a display title, which isn't always the same as the file name. So I suppose I'm asking more out of thoroughness, not disagreement.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.
Docusaurus is just one use case for Markdown, producing online documentation, but that's not the only use case. I use Markdown to write books and blog posts, and I often feed that Markdown into different tools (including this one).
So, I'm looking at this from a general "what would most people writing Markdown expect?" perspective. This plugin needs to consider the whole universe of Markdown use cases.