Giter VIP home page Giter VIP logo

rse-sheffield.github.io's Introduction

RSE Website

Built with Jekyll

Rules for adding contents

Adding Blog Posts

  • Blog posts are located in the _posts folder.
  • The file MUST be prepended with a date e.g. 2018-01-01-my-article-title.md, otherwise they won't be picked up.
  • In the FrontMatter:
    • slug - The varible MUST be set, this is used to generate the permalink of the post. It is done this way to retain backwards compatibility with the old website paths.

Adding images to pages/posts (in Markdown)

  • Images should normally be located in the /assets/images folder but you can make subfolders in assets or images itself to store static resource related to your particular event.

  • If you just want to simply add an image, try this before adding html:

    ![my desciption](/assets/images/my-image-path.png){: .img-fluid}
    

The ! in front of the link indicates that it's an image. The [my description] will appear in your alt text. The site uses bootstrap and the {: .img-fluid} adds a css class img-fluid to make the image responsive.

Linking to local content

  • Content hosted on our website could be linked to via full URL. i.e. https://rse.shef.ac.uk/blog. However, to enable local-testing of this website it is better to link using a root relative link, such as /blog.
    • Alternatively, using Jekyll's Liquid Variable site.root it could be linked as {{ site.url }}blog, however this then ties our content to jekyll.

Adding Events

Note - Add a / at the end of your permalink path so that the page can be accessed even if your user does or does not put a / at the end of their path. E.g. permalink: /mysection/2019-01-01-myevent/ will allow the page to be accessed at https://rse.shef.ac.uk/mysection/2019-01-01-myevent/ and https://rse.shef.ac.uk/mysection/2019-01-01-myevent.

  • Event posts are located in the _events folder.
  • The following FrontMatter variables can be set:
    • category - Tagname of the category that your event belongs to
    • permalink - If you have dedicated pages for each event category, use this to place the event's permalink in the correct page, e.g. for deep learning events at /training/deeplearning/, you might want to set the permalink as /training/deeplearning/2019-01-01-myevent/
    • title - Title of your event
    • date - Starting date with format: YYYY-MM-DD
    • end-date - Optional The end date for events that run over multiple days, with format: YYYY-MM-DD
    • from - Starting time with format: HH:MM
    • to - Ending time with format: HH:MM
    • location - Location of your event
    • eventbrite_id - Optional The ID of your event on eventbrite. This will automatically include the eventbrite's ticket purchasing/registration widget
    • tags - searchable tags, (not implemented yet)

Adding a new Event Category

Updating the rendering when listing individual events

  • The list of categories can be found at /_data/event-categories.yml
  • Add your new category tag to the map, this corresponds to value of the category FrontMatter variable in your event page.

Including events listing in your own events page

  • Create a new page in the /pages folder
  • Include the event listing in your page, you can add a category variable in the include to specify the category or multiple categories using comma separation:
    {% include events_list.html category="mycustomcat" %}
    

Installation

  1. Install ruby
    • On Windows, this installer can be used https://rubyinstaller.org/
    • On Linux, follow the instructions according to your distribution e.g. for Debian/Ubuntu:
      sudo apt install ruby-full
      
  2. In the terminal, install the rest of the required packages:
    gem install bundler jekyll 
    
  3. Go to the root directory of this site and run
    bundler install 
    

Note, if you get an error related to the public_suffix package, try installing and updating bundler before rebuilding the site:

gem install public_suffix --version 3.0.3
bundler update

Building and previewing the site

  • Run the following command to build the site and serve it up on a local server:
    bundler exec jekyll serve
    
  • The website can then be found at http://127.0.0.1:4000

rse-sheffield.github.io's People

Contributors

twinkarma avatar ptheywood avatar willfurnass avatar r-j-arnold avatar mozhgan-kch avatar drj11 avatar ptooley avatar annakrystalli avatar jmcook1186 avatar markdunning avatar

Watchers

James Cloos 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.