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 config option for Highlight.js #1541

Closed
caendesilva opened this issue Feb 9, 2024 · 1 comment
Closed

Add config option for Highlight.js #1541

caendesilva opened this issue Feb 9, 2024 · 1 comment

Comments

@caendesilva
Copy link
Member

It's no secret that I love Torchlight. But for some it may be bothersome to have to get an API key and set it as a CI secret. So I'm wondering if we should have a config option for a client-side library like Highlight.js.

It's fairly easy to add. See https://gist.github.com/caendesilva/84e8399b3255b825f02f92f33e4ebe64

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/dark.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<style>.prose :where(pre):not(:where([class~=not-prose] *)) { background-color: #303030 } </style>
<style>pre code.hljs { padding: 0; }</style>
@caendesilva
Copy link
Member Author

Since it's easy to add, and because adding this could open up a large feature scope where we might want to support a whole bunch of different libraries, it's probably better to make it easier to set HTML from the config. It's still (and has been for a long time) possible to extend the head and scripts Blade components, but when working with things like anonymous projects it becomes a bit cumbersome. Having a nice way to set this in the hyde.yml file would be really nice for cloud setups. Closing in favour of #1542 (until/unless this feature becomes requested by others).

@caendesilva caendesilva closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
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

1 participant