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

Update to highlight.js 10.7.1 #123

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

abelsiqueira
Copy link
Contributor

Related to tlienart/Franklin.jl#803 and tlienart/Franklin.jl#804.

I chose the custom download from https://highlightjs.org/download/ selecting all Common (were already selected) and Julia and Julia REPL from the Other.

@tlienart
Copy link
Owner

Thanks a lot!

This one is a bit trickier, in terms of languages I typically pick https://github.com/tlienart/FranklinTemplates.jl#misc but that's easy to adjust.

The javascript by default doesn't recognise shell> and pkg> so there needs to be a fix for this as per this line: https://github.com/tlienart/FranklinTemplates.jl/blob/master/src/templates/common/_libs/highlight/highlight.pack.js#L639
in that line you'll see that it's basically a copy-paste of the Julia> one 2 times (once for shell, once for pkg). Depending on highlight version the exact syntax to copy paste is a bit different (basically you have to search for the Julia one, and then copy paste).

I don't want to bother you with this though, I'm already grateful for your two PRs! I can do that fix in a bit.

@abelsiqueira
Copy link
Contributor Author

Hi @tlienart, happy to help. I updated the PR with the different highlight custom package and added the shell> and pkg> syntax copies. There was a new aliases:["jldoctest"] for the original, which I didn't know if I should copy or not, so I left it out. The commits are separated for better verification.
I imagine it's hard to make sure I did the right, so feel free to close or modify this PR.

@tlienart
Copy link
Owner

Thanks a lot!

No it's not hard to verify: we just have to locally create a new site with the default template and check the second menu page (/menu2/) (maybe menu 3 one of the two) and check that the code is highlighted properly (there's a few toy code with shell> and pkg

Thanks again for your help!

@abelsiqueira
Copy link
Contributor Author

Looks like it worked:
franklin-template

  • I dev'ed into the FranklinTemplate folder
  • newsite("friedpotato")
  • The highlight.pack.js from fried potato shows 10.7.1
  • serving, nothing appears broken.

@tlienart
Copy link
Owner

Perfect, thank you very much!

@tlienart tlienart merged commit 02553c9 into tlienart:master Mar 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants