Giter VIP home page Giter VIP logo

Jekyll code for VDA-lab website

Creating new blog posts

There are two ways to create new blog posts, either using _drafts first, or straight in the _posts directory. We'll just use the _posts directory... Posts are written in markdown.

Creating a new blog post in the repo involves the following steps:

  • Run jekyll serve (if you don't have jekyll installed yet, see jekyllrb.com)

  • Create a new file in the _posts directory

    • The file name should be the date plus title, in the following format YYYY-MM-DD-this-is-the-title.md

    • The top of the file must include the front matter. These lines trigger the jekyll engine to parse that file as a blog post. The front matter should include:

      1. layout: should be post
      2. title
      3. date
      4. author: your name
      5. tags: list of tags. Please try to reuse the tags already available on vda-lab.be/posts.html
  • Any pictures to be included: add these to the assets directory, and make sure that they are set to 644 permissions. You can refer to these images in your post using {{ site.baseurl }}/assets/your-picture.png.

While you're making these changes, the jekyll serve will pick up any saved changes and rebuild the html pages. Check out http://localhost:4000/~jaerts/ to see you changes. Note that you have to use the ~jaerts subdirectory there...

Creating pages

Any page created will by default show up in the header of the website; the one listing "Home", "People", "Portfolio", etc. To prevent a file from appearing there, add exclude: true in the front matter.

Pull requests and merges

Deploying updates from bitbucket to the actual webserver

The changes have to be uploaded to the ESAT webserver, because jekyll is not installed there. This means that we had to set the base_url variable in _config.yml to ~jaerts

After making changes locally:

  • jekyll build
  • tar -cvzf _site vda-lab.tar.gz
  • scp vda-lab.tar.gz ssh.esat.kuleuven.be:/users/stadius/jaerts/

On the server:

  • tar -xvzf vda-lab.tar.gz
  • rm -r -f public_html
  • mv _site public_html

Or now, just run deploy.rb.

Merging the teaching subrepos

I'm keeping the teaching material in separate repositories per course. To manage these together with the main public_html (based on this blog post and this one):

Starting from the course

Making changes to a course

As usual, just clone the course-specific repository (e.g. jandot/i0u19a), make changes, commit, and push to bitbucket.

Combining the subrepos into the main public_html

Using git subtree. For each course:

  • git remote add i0u19a [email protected]:jandot/i0u19a.git
  • git subtree add --prefix teaching/i0u19a/ i0u19a master

Pulling changes from the subrepo

git subtree pull --prefix teaching/i0u19a/ i0u19a master

Making changes to a course from within public_html

Making changes to a course

Just make the changes in the subdirectory of the course within the public_html project. Then git add, git commit and git push to the public_html repository. At this point, the changes will not be in the course-specific repo yet.

Pushing those changes to the course-specific repository

git subtree push --prefix teaching/i0u19a/ i0u19a master

Organizing the posts and pages from the subrepos

In order to have only the main blog posts appear in the website, add categories: main to each blog post. The posts in each course should have the name of the course as the category: e.g. categories: i0u19a.

The liquid code in the posts.md files mention site.categories.i0u19a, which will return all blog posts with category i0u19a.

Icons are from https://design.google.com/icons

Visual Data Analysis lab's Projects

Visual Data Analysis lab doesnโ€™t have any public repositories yet.

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.