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

Prism JS plugin to display filename #1038

Closed
plaindocs opened this issue Mar 21, 2017 · 5 comments
Closed

Prism JS plugin to display filename #1038

plaindocs opened this issue Mar 21, 2017 · 5 comments

Comments

@plaindocs
Copy link
Contributor

Hidden away at the bottom of this page:

http://prismjs.com/plugins/show-language/

is the options of using data-language CSS attribute to display a filename for the code example.

It requires adding the plugin to Prism, and then tweaking the CSS to make the display of the filename more distinct, but would allow us to cut out quite a lot of boiler plate "put this into your .travis.yml" type text.

It does however require some fairly ugly css in the markdown such as

```
Some normal code here
```
{:  data-language=".travis.yml"}

@lislis @MariadeAnton thoughts?

@lislis
Copy link
Contributor

lislis commented Mar 21, 2017

@plaindocs I'm quite fond of code snippets saying what language or file it stems from +1
If you can live with the ugly markdown, I can live with tweaking the CSS for display 💃

@plaindocs
Copy link
Contributor Author

Sounds good to me.

@plaindocs
Copy link
Contributor Author

@lislis wanna take a look at this and let me know what you need from my side?

@lislis
Copy link
Contributor

lislis commented May 29, 2017

@plaindocs sorry, I forgot about this one.
Here you go #1209

@BanzaiMan
Copy link
Contributor

This was merged.

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

3 participants