-
Notifications
You must be signed in to change notification settings - Fork 37
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
Replace Prism with starry-night #56
Comments
Looks interesting. What are the performance implications? What are the advantages over what we currently have? Given that this is a big breaking change, we should consider doing #55 at the same time (if we choose to do so, as I said there I am a little -1 on it). |
It's by remark author so I would not worry too much about that.
It's a breaking change for good. And this is intended after #55, or else it would need to import styles from starry-night. |
We determined in #67 that starry night is too slow for default usage here. We might be able to still use it if we have a toggle between "fast but bad" vs "good but slow". |
Since YAML parsing is still broken, I would very much appreciate such a toggle |
@hashrock opinions on a toggle here? |
Hi guys, please take a look at my PR #96 which solves the yaml issue. (Or at least it tries to -- please let me know if it's not working as expected!) |
I don't want to say I don't care about performance at all, because if the page took 20 seconds to load it would be a dealbreaker. If it takes 2 seconds to load a page with bullerproof syntax highlighting that matches GitHub exactly, though, I'm good with that. I care way more about accuracy than performance for a blog. Looking at all the YAML blocks with only two colors, and most of them wrong, is aggravating. I just spent 2 hours trying to move to Starry Night myself, but got so caught up trying to match the the styling that is spread between UnoCSS, gfm, and the syntax css that I gave up. I'll probably take another crack soon, because after seeing what Starry Night can I don't see any point to Prism anymore. Who cares if its faster when it renders the wrong thing? |
I've used Starry Night extensively in Pyro. The performance in real-world code snippets is very tolerable (sub 100 ms for a whole page). The performance on arbitrary code snippets (minified code or 1000+ lines of code) is rather slow. I think for personal blog posts or documentation where the code snippets are known a priori, starry night works great. You can check out working YAML using starry night at https://pyro.deno.dev/getting-started/configuration/. |
Yeah, that looks perfect. I'm not yet ready to move to a different platform, but if getting Starry Night working with deno-gfm/deno_blog ends up being too much work I will give Pyro a look. |
Pyro was just an example use of Starry Night, it's really great for nice looking code snippets. I do not recommend Pyro for blogs just yet. I'm +1 for having a config option for starry night. What are your thoughts hashrock? |
yeah +1 for having a config option |
If you do add a config option, please include |
starry-night is a syntax highlighter with feature parity to GitHub, which makes it an interesting alternative to currently used Prism. And styling is free if #55 is accepted.
The text was updated successfully, but these errors were encountered: