-
Notifications
You must be signed in to change notification settings - Fork 6
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
Setting up highlight.js for deployment manually #21
Comments
Hello! The easier route would be that you use GitHub actions but I understand if you’d rather not. If you have a look at the deploy script, you’ll see that the last command before deploy is Here’s the line:
Where the args indicate where the folder is (if you use the default leave as is) and should be (if you just want it to be in gh-pages as is, leave blank) |
Thanks! However, I got a warning regarding
I installed
Do you know what the problem is? Update: running from my project directory (not under
I'm trying to figure out why Franklin sets
However, it looks like Franklin sets this variable to If I
From my project's directory:
I'm completely stumped about why Franklin can't find |
This is the kind of reason why using GitHub action is easier :-) You need to install highlight.js in a way that Julia can find it (good to do it via NodeJS) and then need to rebuild Franklin. Note that if Franklin complains about not finding these libs, it’s totally fine, it just means that your JavaScript for code and maths will not be pre-rendered, this is not an issue and your page will still render fine. |
Thanks Thibaut, but I'm still confused.
If you think this is not a bug, please let me know and I'll take the discussion to Julia's forum -- I don't want to pollute your issue tracker with support questions. |
Hmm sorry I think it’s important to get what’s going on here and improve the docs. Can you just clarify what you did when you say you ran the “build.js”? Can I just check with you that you did
and that after restarting a Julia session and doing Thanks a lot! |
I finally hit on the right incantations and it seems like everything is working. Thanks for your help! One final comment: the documentation for PkgPage suggests running
whereas Franklin's suggests running
(note the |
Great, I’ll leave this open as a reminder to fix the docs and make it clearer what the steps need to be, thanks |
@tlienart I think one reason why this ended up being so confusing for me is that running After I triggered a recompilation (by Do you want me to open an issue over in Franklin's tracker? |
It’s fine here or there I’ll adjust the docs as per your comments, thanks for the feedback, much appreciated! Ps: as a side note I also have experienced such issues with NPM, it’s sometimes a bit weird where assets are installed and how to indicate that to Julia, the word “incantation” works well; maybe we could provide an automated process for this but it would require a better understanding of NPM |
I'll try to write down the steps to get the extras (highlight.js and purgecss) installed and operational. Also, I think it would be worthwhile to include a mechanism in Franklin to detect the extras if they are installed after Franklin. Right now, the detection code only runs when Franklin is precompiled, and there is no easy way to trigger a precompile. One way to solve this would be to detect the extras at runtime; another would be not to declare |
Quick update: so far I've been unable to figure out a sure-fire way to install the extras in a repeatable manner in a global directory. @tlienart Do you want to allow users to have a global npm installation directory? Personally, I think it's much better than having to install the modules in every
Update: Would it be acceptable to set things up to use the system's Update 2: I got it to work. Specifically, I know how to make it work with a global installation of nodejs modules, and with the system's (not Julia's) nodejs install. I need to take a break, I'll come back later with more details. |
Thanks so much for this effort, hugely appreciated |
Thibaut, here are my notes. These are broad and cover more than this single issue. Let me know if these need clarification, or if you want me to submit separate issues or anything. I don't know how and/or if you'll decide to tackle these issues, but please also let me how can I help. Thanks! Notes on manual deployment with PkgPage and Franklin, and in particular the installation of Current issues or problems:
How to install extras:There are two ways to install the extras:
Bundle everything?Given how small some of these packages are, I think that bundling everything with PkgPage/Franklin is an option worth considering. The included files could even be adapted to this use case; one example would be modifying |
Thanks a lot for this; I'll need to look at this in details and see what's the best way forward (if anything, better docs). Note also that things "just work" if you use GitHub or GitLab CI which is what most users do, so I'll need to make sure whatever comes out of this doesn't break that. Thanks again for looking into this! (Ps: I'm not very keen on the bundle everything path) |
You're welcome! I understand that your priority is using automated CI to deploy. What I'm hoping for is that manual deployment remains an option, for those of us who prefer to work that way. |
I am using PkgPage to write the documentation for a small package. The docs will be hosted in Github, under
mbaz.github.io/GtkServer.jl/
. I am usingserve(single=true)
to generate the website, and then I push the contents ofpage/__site
to a gh-pages branch on Github.However, after running
serve(single=true)
, the paths inpage/__site/index.html
don't include the prepath defined inconfig.md
.This line is in my
config.md
:All the paths in
index.html
are missing the prepath; for example:As a result, the webpage renders incorrectly. This happens for all paths: javascript, css, libraries and assets are all affected.
Note this line in
config.md
produces identical paths:If
serve()
should not add the prepath, is there some other Franklin or PkgPage function to add it?The text was updated successfully, but these errors were encountered: