GithubHelp home page GithubHelp logo

cbl-website's Introduction

User manual

This static website is powered by Hugo.

Base Usage

Workflow

  1. Fork the repo on github
  2. Make changes on your fork (e.g., add a new person or news item)
  3. Make a pull request
  4. Guillaume will then review and deploy the changes

Add/edit a person

If you want to add yourself, do the following:

  1. In the forked repository on github, go to content/people.
  2. Click on Add file inside content/people
  3. Name your file your-crsid.md.
  4. Copy the content of someone else's profile (e.g., other-crsid.md) to that new file.
  5. Make the necessary substitution/changes.
  6. Commit your changes.

If your profile already exists and you want to change it, edit the markdown file your-crsid.md.

To add a photo of your self, do the following:

  1. Go to static/people in your forked repo. Yous should see the profile photos of other people in CBL.
  2. Click on Add file to upload your own photo. Noe that your photo needs to be named your-crsid.jpeg, your-crsid.jpg, or your-crsid.png. Otherwise, it will not work.

Advanced Usage

Workflow:

  1. Download Hugo Extended
  2. Fork the repo on github
  3. Clone it locally
  4. Make your changes (e.g. add a publication, a news item, ... see below)
  5. Look at the result by running hugo serve and visiting the localhost:1313 URL in your browser
  6. Once satisfied, commit and push your changes
  7. Go to github and issue a pull request
  8. Guillaume will then review and deploy the changes which will become public

Installing Hugo

We use Hugo extended to generate the static website. The easiest way to install hugo extended is to download the binary from Hugo's website and ensure that the binary can be found in PATH.

From command line, one can install Hugo Extended with the following commands:

mkdir hugo # create folder in directory of choice
cd hugo
# on MacOS
wget -c https://github.com/gohugoio/hugo/releases/download/v0.79.0/hugo_extended_0.79.0_macOS-64bit.tar.gz -O - | tar -xz -C .
# on Linux
wget -c https://github.com/gohugoio/hugo/releases/download/v0.79.0/hugo_extended_0.79.0_Linux-64bit.tar.gz -O - | tar -xz -C .

To make Hugo available in the PATH, add the following line to your .bash_profile or .zshrc:

export PATH="path/.../to/hugo:$PATH"

Alternatively, you can copy the binary file to /usr/local/bin with:

sudo cp path/.../to/hugo/hugo /usr/local/bin

Previewing locally

Once your have installed hugo, you can preview changes locally with:

cd cbl-website
bash scripts/autopopulate.sh
hugo server -D

This will launch a local service of the CBL website. You should be able to preview it your browser at localhost:1313.

Adding a new person

cd cbl-website
hugo new people/[crsid].md
cp path/.../to/photo/[crsid].jpg static/people/[crsid].jpg

Then edit the file just created in content/people/[crsid].md. The filename of your photo must be your crsid, with extension .jpg, .jpeg, or .png.

Adding a news item

cd cbl-website
hugo new news/title-of-the-news.md

Then edit the file just created in content/news/[...].md, to read e.g. like so:

---
title: "Bernstein workshop, Berlin, 25-26 September"
date: 2018-09-19T09:54:07+01:00 # leave as is
blurb: "short (markdown) description goes here"
force-display: false # the last 10 items will be automatically displayed on the front page, + any that says "force-display: true"
draft: false
---

You may write some markdown here to give a more in-depth description of the piece of news.

Adding a new BLG publication

cd cbl-website
hugo new publications/author-journal-year.md

Note that the exact file name does not matter, we only suggest e.g. hennequin-neuron-2018.md as a way of keeping our files tidy. Then edit the file just created in content/publications/[...].md and populate all the metadata. Currently, only BLG publications are rendered in the individual labs' websites (Ahmadian, Hennequin, and Lengyel). MLG publications are maintained here.

cbl-website's People

Contributors

andrewfoongyk avatar austint avatar chaochaolu avatar davidburt2 avatar edaxberger avatar edwardjamesyoung avatar ghennequin avatar jamesallingham avatar jfb54 avatar mattashman avatar mgironamata avatar mpatacchiola avatar nikikilbertus avatar rhaps0dy avatar rmclarke avatar siddharthswaroop avatar syncrostone avatar tachukao avatar vincentstimper avatar wesselb avatar willtebbutt avatar wy1iu avatar yahmadian avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.