-
Notifications
You must be signed in to change notification settings - Fork 494
Refactor to simplify and automate more #120
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
Conversation
notebook_name = | ||
basename(without_pluto_file_extension(section.notebook_path)) | ||
@htl(""" | ||
<a class="sidebar-nav-item {{ispage /$notebook_name/}}active{{end}}" href="/$notebook_name/"><b>$(chapter_number).$(section_number)</b> - <em>$(section.name)</em></a> | ||
""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notebook_name = | |
basename(without_pluto_file_extension(section.notebook_path)) | |
@htl(""" | |
<a class="sidebar-nav-item {{ispage /$notebook_name/}}active{{end}}" href="/$notebook_name/"><b>$(chapter_number).$(section_number)</b> - <em>$(section.name)</em></a> | |
""") | |
notebook_name = | |
basename(without_pluto_file_extension(section.notebook_path)) | |
notebook_id = flatten_path(without_pluto_file_extension(section.notebook_path)) | |
@htl(""" | |
<a class="sidebar-nav-item {{ispage /$notebook_name/}}active{{end}}" href="/$notebook_id/"><b>$(chapter_number).$(section_number)</b> - <em>$(section.name)</em></a> | |
""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some explanation, since there doesn't seem to be highlighting of changed words:
This fixes links to notebooks in the sidebar.
It uses notebook_id
instead of notebook_name
for the href. notebook_id
is the name you assign to the build of the notebooks, e.g. notebooks_week3_newton_method
.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Error encountered when trying to play with the branch. Should I update the versions of the packages? |
This question sounds bit stupid. Should I use all the materials in |
@delphinH @likanzhan The code in https://github.com/greimel/18S191-reduced should work fine. Instructions
The code should work fine for local preview and deployment on github pages. @fonsp I think the code in my fork is pretty much ready to be turned into a template repo. I am hesitant to set it up myself, since it is essentially your code. How do you suggest to proceed? |
Thanks, @greimel, that would be great. When I run the the template you reduced, I got the following error It seems that the version of My question is is there a specifically reason we continue use the old format of Pluto, i.e., using If we need to stick to the old mode, my second question is should I update the versions of Pluto and PlutoSliderServer in the newwebsite project or is there some other way so I can correct the error? Thanks. Likan |
I don't think that this would make a difference, since the manifest has been added to the repo. Probably there are Pkg server issues? |
I turned this PR into a template repository (see the website this template generates) Instructions (see also the README in the template repo)
The code should work fine for local preview and deployment on github pages. |
157ce27
to
5010d76
Compare
Superseded by #124 |
In this rewrite, the entire process to generate the site will be done by one script (written as a Pluto notebook, of course), instead of a combination of manual scripts, CI Julia scripts and Franklin. Right now it doesn't use Franklin at all anymore, but I might add back Franklin to process markdown files.
This makes it easier to set up a fork of the website, since the whole system now uses the same
book_model.json
file as input (describing the list of notebooks in the sidebar).The notebook to generate the site can also be used to run and test it locally, and this local version now includes HTML exports of notebooks (before, you had to trust that the github CI would work properly) and can partially update automatically. It will be easy to add local support for the slider server later.
Eventually, the hope is that you can edit the course page by directly editing the sidebar on the left. That will probably be a separate project
Try it
Update Pluto and run the notebook in
newwebsite/generate.jl
.