Giter Site home page Giter Site logo

wanghejin / nushackers-site Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nushackers/nushackers-site

0.0 0.0 0.0 86.03 MB

NUS Hackers website

Home Page: https://www.nushackers.org

License: MIT License

JavaScript 6.28% Python 8.38% HTML 54.19% SCSS 31.15%

nushackers-site's Introduction

NUS Hackers website

This is the repository behind NUS Hackers' website https://nushackers.org.

Requirement

The website is built with Hugo, so if you want to make changes to the templates or structures of the site, please first read about Hugo. But if you are just going to modify the data or update/add a post, you can simply follow the guide below.

Getting started

You should test the site locally before doing any push. You will need:

  1. Hugo v0.92.0
  2. Yarn v1 with a recent version of NodeJS
    • We have stopped using the dated Gulp CSS pipeline that uses node-sass, so the version of NodeJS doesn't matter as much anymore.

Then enter this folder and run

yarn install
yarn dev

Hugo will now generate the site and watch the directory and update the site when any changes are made. You can access the site at http://localhost:4000.

Updating data

First, since Hugo uses yaml as the markup for data. It's really simple, so just read about it first.

With some knowledge of yaml, you can take a look at the content folder - it contains the data for displaying the Friday hacks in the index page, coreteam members in the /about page and coreteam alumni in the /alumni page. More details below:

In data, friday_hacks.yml is for the Friday hacks (duh!). It contains a list (under hacks) of objects each with four fields: speaker, from, title and venue. Leave the speaker field empty to mark it as 'slot is open', or fill it up if it's filled up. For special occasion such as holidays, delete all fields and put nohack as the sole field with the reason as the value, e.g.

- nohack: Good Friday

It also contains a field start_date which should be the date-time of the first Friday hack.

coreteam_members.yml is for the coreteam member info in /about. It contains again a list with objects each with 2 fields: name and description, so just fill that up. The first guy or gal should be the president.

alumni.yml is in the same format as coreteam_members.yml. So to move a coreteam member to alumni, just cut and paste the entry into alumni.yml

Updating posts

About writing posts: https://gohugo.io/content/

If you are write those generic posts about Friday hacks, please use the script scripts/gen_fh.py - yep, it's in Python yay! So install Python and Pipenv first.

Before running the script for the first time, use Pipenv to install our dependencies.

$ cd scripts
$ pipenv install

To use the script, first make sure you have filled up the Friday hacks entry in data/friday_hacks.yml, then just run it.

$ pipenv run python gen_fh.py

It will ask for you name (as the author), and generates the md file in post/content. Now go ahead and add in more details to the post.

Final words

If you dislike any parts of this website, just clone it and push your changes! Make sure you update README.md, though, or the octopus will be really pissed off.

nushackers-site's People

Contributors

advaypal avatar angelsl avatar chaitanyabaranwal avatar changchuming avatar chrisgzf avatar dependabot[bot] avatar donjar avatar hcwong avatar indocomsoft avatar jellyjellyrobot avatar jethrokuan avatar jin avatar joey-c avatar kouyk avatar le0tan avatar li-kai avatar mkeoliya avatar ramuvairavan avatar raniceyue avatar raynoldng avatar shenyih0ng avatar simonjulianl avatar sushinoya avatar taneliang avatar tohlh avatar varunpatro avatar yangshun avatar yyjhao avatar ziqing26 avatar zwliew 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.