Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone 1 #74

Merged
merged 28 commits into from
Aug 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# editorconfig-tools is unable to ignore longs strings or urls
max_line_length = null
189 changes: 189 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################

## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto

## SOURCE CODE
*.bat text eol=crlf
*.coffee text
*.css text
*.htm text
*.html text
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.od text
*.onlydata text
*.php text
*.pl text
*.py text
*.rb text
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text

## DOCKER
*.dockerignore text
Dockerfile text

## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text

## LINTERS
.csslintrc text
.eslintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.stylelintrc text

## CONFIGS
*.bowerrc text
*.cnf text
*.conf text
*.config text
.browserslistrc text
.editorconfig text
.gitattributes text
.gitconfig text
.gitignore text
.htaccess text
*.npmignore text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

## HEROKU
Procfile text
.slugignore text

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.swc binary
*.swf binary
*.webm binary

## ARCHIVES
*.7z binary
*.gz binary
*.rar binary
*.tar binary
*.zip binary

## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

## EXECUTABLES
*.exe binary
*.pyc binary
72 changes: 70 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
# Production folder
dist
public

# Compiled css
*.css

# VSCode configuration
.vscode

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# Mac stuff
.DS_Store
_site
.jekyll-metadata
1 change: 0 additions & 1 deletion .nojekyll

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
nushackers-site
====================
# nushackers-site

Sup! This is the source code of the nushackers blog site http://nushackers.org.
Development blog site at https://nushackers.netlify.com

## Requirement

This website is built with jekyll, so if you want to make changes to the templates or structures of the site, please first read about <a href="http://jekyllrb.com">jekyll</a>. But if you are just going to modify the data or update/add a post, you can simply follow the guide below.
This 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](https://gohugo.io/overview/introduction/). But if you are just going to modify the data or update/add a post, you can simply follow the guide below.

## Getting started

It's recommended that you test the site locally before doing any push. To do so, first <a href="https://www.ruby-lang.org/en/installation/">install ruby</a>.

Then, install jekyll:

```bash
$ gem install jekyll
```
It's recommended that you test the site locally before doing any push. To do so, first install [hugo v0.24]("https://github.com/gohugoio/hugo/releases") and [node lts](https://nodejs.org/en/).

Then enter this folder and run

```bash
$ jekyll serve --watch
npm install
npm start
```

jekyll 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`
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 jekyll is written in the hipster language ruby, it also uses <a href="http://en.wikipedia.org/wiki/YAML">yaml</a> as the markup for data. It's really simple (and non-mainstream), so just read about it first.
First, since hugo uses [yaml]("http://en.wikipedia.org/wiki/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 `_data` folder - it contains the data for displaying the Friday hacks in the index page, coreteam memebers in the `/about` page and coreteam alumni in the `/alumni` page. More details below:
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:

`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.
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.

```yml
- nohack: Good Friday
Expand All @@ -45,18 +40,18 @@ It also contains a field `start_date` which should be the date-time of the first

## Updating posts

About writing posts: http://jekyllrb.com/docs/posts/
About writing posts: https://gohugo.io/content/

If you are write those generic posts about Friday hacks, please use the script `_script/gen_fh.py` - yep, it's in Python yay! So install Python first.
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 first. You can then use pip to install the packages in requirements.txt.

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

```bash
$ cd _scripts
$ cd scripts
$ python gen_fh.py
```

It will ask for you name (as the author), and generates the md file in `_posts`. Now go ahead and add in more details to the post.
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

Expand Down
22 changes: 0 additions & 22 deletions _config.yml

This file was deleted.

Loading