Giter Club home page Giter Club logo

hacksoc.org's Introduction

HackSoc.org rewrite

This build system is based on Node.js and Handlebars. It replaces the previous system, which used Haskell and Hakyll.

Writing content

See Installation Instructions to get set up. Please test your changes locally before committing.

Index/home page

As this includes the most recent news articles, editing the homepage is done through index.handlebars. The 5 most recent news articles are rendered via newslist.handlebars, then index.handlebars itself is rendered, and finally passed to wrapper.handlebars.

'Regular' pages

These can be found in regular/, and consist of a YAML header and a HTML body, which is inserted into the template wrapper.handlebars.

YAML fields

  • title: put into the <title> element of the page.

News articles

Written in Markdown, with a YAML header:

  • title: the title of the article, put into the <title> and <h1> elements and shown in the list of news articles.

The first paragraph of the article is shown as an excerpt in the news article list, Markdown requires a blank line (not just a single newline) to indicate a new paragraph.

Minutes

For the moment, minutes are in PDF form and are put into minutes/. These are copied into the web directory, along with an index page which lists all the minutes in the directory. The filename format is YYYY-MM-DD-meeting name.pdf. Regular committee meetings are simply YYYY-MM-DD-Minutes n.pdf. The minutes page sorts these in ascending date order based on the filename, so omitting the date will cause this to fail.

Templates

Most of the site is generated through the wrapper.handlebars template. This takes the content of the page, the title, plus some global values found in templates/context.yaml:

  • servers: controls the list of servers on the website banner
    • name: name of this server (capitalised, hostname only)
    • href: link to this server's README (typically just http://<hostname>.hacksoc.org/).
  • nav: links for navbar
    • text and href: fairly self-explanatory

Server READMEs

Written in Markdown. Like regular pages, has a YAML header:

  • hostname: lowercase hostname of the server
  • fqdn: full domain of the server, typically <hostname>.hacksoc.org
  • name: purpose/subtitle of the server (eg "shell server")

Don't worry about a H1/title, it's generated by the template. All headings in the document should be H2 or below (##).

Style guide

To keep a consistent style, the following rules are used:

  • Line length: text in news/ should not exceed 70 characters per line (the odd 71 is okay). Otherwise, documents should NOT use hard wrapping, and instead use your editor's soft wrap setting to display long lines of text.

Years of study

about.html contains information about the committee, including their current year of study. The year given should be the 'stage' that the committee member is in. When a member is on a year in industry, they should not be listed as being in any year and instead as "currently on year in industry". If the year in industry is in between stages two and three, they will return as a "third year".

More guides may be added so always check this section when authoring new content!

Installation

0. Prerequisites:

You'll need Node.js (with npm) to install and run this. Don't install Node.js from your package manager repositories, it's likely outdated.

1. Clone this repo:

$ git clone [email protected]:HackSoc/HackSoc.org

2. Install dependencies

$ cd hacksoc.org/
$ npm i

3. Build

$ npm start

This builds the site to the output folder html/, you need to run this command every time the content updates in order to keep the web version up-to-date.

4. Test

$ npm test

This will start a web server on your computer and open a browser to index.html, so you can test that your changes work correctly.

Adding features

hacksoc.org's People

Contributors

barrucadu avatar lukemoll avatar aaronc81 avatar lexbailey avatar matzipan avatar fromankyra avatar sersorrel avatar dincahill avatar adambirtles avatar jmalego avatar lordaro avatar qlkzy avatar tinnedtuna avatar taneb avatar chongyangshi avatar icydoge avatar cascades avatar davidjnorman avatar stary2001 avatar kiamalderson avatar dallinson avatar ddm999 avatar dpk avatar 46bit avatar sdhand avatar sourceless avatar vivan 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.