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 title support for code blocks #1277

Closed
Mister-Hope opened this issue Mar 9, 2023 · 3 comments · Fixed by #1456 or #1469
Closed

Add title support for code blocks #1277

Mister-Hope opened this issue Mar 9, 2023 · 3 comments · Fixed by #1456 or #1469
Assignees
Labels
enhancement New feature or request

Comments

@Mister-Hope
Copy link
Member

Clear and concise description of the problem

It would be great if people can set a file name for code blocks, e.g.

```js [.vuepress/config.js] {1,3}
const a = 1;

console.log(“hello world”)
```

Suggested solution

Above

Alternative

No response

Additional context

No response

@Mister-Hope Mister-Hope added the enhancement New feature or request label Mar 21, 2023
@nimonian
Copy link

nimonian commented Apr 3, 2023

Seconded, I would love this too. Perhaps, when the title is provided, it could replace the language name that appears in the top right?

@Mister-Hope
Copy link
Member Author

PR welcomed for this. It would be great if you could help.

@nruffing
Copy link
Contributor

I can help with this if you would like to assign this to me. I like the the idea of of being able to specify text to override the displayed language name, especially for setting it to a filename.

nruffing added a commit to nruffing/vuepress-next that referenced this issue Dec 26, 2023
nruffing added a commit to nruffing/vuepress-next that referenced this issue Dec 28, 2023
meteorlxy added a commit that referenced this issue Dec 31, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants