Skip to content
Marcelo Forets edited this page Oct 2, 2024 · 89 revisions

Setup guide

  1. Install the prerequisites which include go and hugo.

    • For hugo, you can use the binary (see releases here) corresponding to the extended version. The version number should match the one specified by HUGO_VERSION in the file netlify.toml of this repo.
    • In MacOS you can also use the package manager: brew install go, brew install hugo.
  2. Clone this repository and its submodule.

$ git clone --recursive https://github.com/JuliaReach/JuliaReach-website.git
  1. Check that the site builds correctly with ./hugo server. This should serve the webpage at a local domain, e.g. http://localhost:1313/.

Working on the website

Update the webpage and when you are happy push to the remote repository:

  1. Do hugo serve to ensure that the public folder has the latest changes.
  2. cd to public and commit the changes to the master branch and push.
  3. Go back to the JuliaReach-website folder and commit all files, then push. Ensure that changes to public are also commited.

After these changes, the website is served from the repository: https://github.com/juliareach/juliareach.github.io


JuliaReach Days

Useful links

Troubleshooting

Installing

$ ./hugo server
Start building sites  

                   | EN  
-------------------+-----
  Pages            | 37  
  Paginator pages  |  0  
  Non-page files   |  1  
  Static files     |  3  
  Processed images | 26  
  Aliases          |  5  
  Sitemaps         |  1  
  Cleaned          |  0  

Built in 243 ms
Watching for changes in /home/mforets/Projects/HugoAcademic/starter-academic/{assets,content,data,static}
Watching for config changes in /home/mforets/Projects/HugoAcademic/starter-academic/config.toml, /home/mforets/Projects/HugoAcademic/starter-academic/config/_default, /home/mforets/Projects/HugoAcademic/starter-academic/go.mod
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at //localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Hugo Academic resources

Blogging

Web apps

Other websites

Crowd funding

Images

  • Reducing the size of a pdf:
    • ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=sdof_flowpipe_discretization_prepress.pdf sdof_flowpipe_discretization.pdf
      variable name (can be put in a bash script):
      ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$1_v2" $1
    • https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file

Creating a post with a jupyter notebook

  • https://wowchemy.com/docs/import/jupyter/

  • Create a new post with hugo: hugo new --kind post post/my-post

  • Convert notebook to Markdown jupyter nbconvert Untitled.ipynb --to markdown --NbConvertApp.output_files_dir=. or in the notebook use File > Download as > Markdown

  • Move the resulting files to the folder in /JuliaReach-website/content/post/my-post

  • Use cat notebook.md | tee -a index.md

  • Edit metadata in index.md

  • Remove notebook.md