Julia Project website
The Julia website is generated using GitHub pages and Franklin.jl, a Julia native package for building static websites.
To suggest a change to the website, you can simply navigate to the page with the content you think should be changed, and edit it. You will be prompted to fork the repo (if you haven't already) and then open a Pull Request. Once your Pull Request is merged, you should see your changes show up on the website in a few minutes or less.
Build previews for each Pull Request will be linked in the comment section of the PR once the site has been successfully build.
Note: please only use fenced code blocks (i.e. code blocks delimited by backticks) and not indented code blocks.
To suggest a change to the website that is more significant, it is suggested that you make said changes and test them locally on your device. You can do this by simply forking the base repo, cloning it locally onto your device, making the changes you want, and then following the "Installing locally" instructions below.
Once you have validated that everything looks good, you can open a Pull Request and check the Deploy Preview from Netlify as a final sanity check.
Build previews for each Pull Request are available at: https://julialang.netlify.app (note that given the GitHub Actions design, build previews are only available for those who have write access to the repo).
Clone the repository and
cdto it. Start julia with
julia --projectand do
julia> using Pkg; Pkg.instantiate()
julia> using Franklin
julia> serve() → Initial full pass... → evaluating code [...] (learning/code-examples.md) → Starting the server... ✓ LiveServer listening on https://localhost:8000/ ... (use CTRL+C to shut down)
localhost:8000in a browser and you should see a preview of any modifications you make locally.
Modifying the CSS: modify the relevant files in
Modifying the HTML structure: if you want to modify the navbar, or the footer, go to
_layout/and modify the relevant template fragment.
Modifying the landing page: since the landing page has its own design, it is written in HTML with a few insertions of repurposeable fragments where appropriate, just modify
Follow the blueprint of the many other blog posts in terms of folder structure and file structure. One important thing to bear in mind is that RSS is a bit picky in terms of what it can accept so be careful for what goes in
@def rss = ...
@def title = ...
&, for instance change
rss, no links, no markup, no HTML entities.
If in doubt, after running Franklin's server, copy the content of
__site/feed.xmlinto the w3 feed validator, it should show "Valid RSS feed".
In order to addtags on your blog post, add
@def meta =[("aaa", "bbb", "ccc"),]
(you can specify multiple tags of course). See for instance Keno's recent blog post.
Every so often, one should do an in-depth check that there are no broken links. While Franklin provides a quick way to do this, it's a good idea to this in depth from time to time. The broken-link-checker package is a pretty neat way to do this. After installing it with
blc https://julialang.org -ro
(it takes a while, and may require you to do it in several steps).