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 Code Titles #3227

Closed
hmajid2301 opened this issue Jun 11, 2022 · 2 comments
Closed

Add Code Titles #3227

hmajid2301 opened this issue Jun 11, 2022 · 2 comments

Comments

@hmajid2301
Copy link

Is there an easy way we can include the title of a file of a code block such as:

image

@Martinomagnifico
Copy link
Collaborator

Just add the title as a span inside your pre, before the code. Then it will inherit the code font. Add some styling like this:

pre span.title {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding-bottom: 0.5em;
	border-bottom: 1px solid rgba(255, 255, 255, .5);
}

@Martinomagnifico
Copy link
Collaborator

I think the issue can be closed.

This issue was closed.
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

No branches or pull requests

2 participants