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

Feature Request: Specify hljs Style #34

Closed
KyleKing opened this issue Feb 23, 2019 · 2 comments

Comments

2 participants
@KyleKing
Copy link
Contributor

commented Feb 23, 2019

For working with Highlight.js outside of Node, how do people typically import the CSS files? Do you download the file and import locally or are they hosted on an online CDN?

For the default template, would you consider setting the default style to one of Foundation, Github Gist, Atom One Light, or A 11 Y Light that provide better highlighting of variables and built-ins?

Try the hljs demo: https://highlightjs.org/static/demo/

@kernc

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2019

Currently, to avoid bikeshedding, the default highlight style is "github", loaded from CDN:

% if show_source_code:
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" rel="stylesheet">
%endif

A config.mako tunable highlight_style (defaulting to 'github') would be reviewed favourably.

KyleKing added a commit to KyleKing/pdoc that referenced this issue Feb 25, 2019

Add: configurable hljs style. Fixes pdoc3#34
Also, fix the font-size, which was bumped into the wrong code block with the last commit

KyleKing added a commit to KyleKing/pdoc that referenced this issue Feb 25, 2019

KyleKing added a commit to KyleKing/pdoc that referenced this issue Feb 25, 2019

@KyleKing

This comment has been minimized.

Copy link
Contributor Author

commented Feb 25, 2019

Up too early this morning and just couldn't get this commit right. I've only ever used git push origin --force on git --bare init repositories, and probably won't use it on Github again 🐑

@kernc kernc closed this in #38 Feb 25, 2019

kernc added a commit that referenced this issue Feb 25, 2019

ENH: Configurable highlight style (#38)
* Refac: Atom One Light hljs style & css tweaks

* Revert: CSS previous changes. Only keep 12px code

* Add: configurable hljs style. Fixes #34

* Rename config.mako option to `hljs_style`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.