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

Updating docs #95

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions branch-off.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

# check if branch name is specified
if [ -z $1 ]
then
echo 'No branch name was specified'
exit
fi

# create new folder and file in js
mkdir js/posts/$1
touch js/posts/$1/$1.js

# create new folder and file in css
mkdir css/posts/$1
touch css/posts/$1/app.css

# create new folder and file in img
mkdir img/posts/$1
cp img/cover-photo.png img/posts/$1/

# create new folder in datasets
mkdir datasets/$1

# create new post
now=$(date +%Y-%m-%d-)
touch _posts/$now$1.md

# add template to post
echo "
---
title: $1
teaser: $1
authors:
key_takeaways:
- Takeaway 1
- Takeaway 2
featured_image:
url: /$1/cover-photo.png
og_image: /$1/cover-photo.png
stylesheets:
- $1/app.css
scripts:
- $1/$1.js
---
NOTE: THIS LINE IS A REMINDER TO CHANGE ARTICLE DATE ON DAY OF PUBLISHING. (DON'T REMOVE THIS LINE UNTIL DAY OF PUBLISHING)" > _posts/$now$1.md
2 changes: 1 addition & 1 deletion docs/advanced/frontend.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/frontend/
permalink: /docs/advanced/frontend/
---

# Summary
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/apis.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/apis/
permalink: /docs/beginner/apis/
---

## What Are APIs?
2 changes: 1 addition & 1 deletion docs/beginner/chartjs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/chartjs/
permalink: /docs/beginner/chartjs/
---

## ChartJS
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/command-line.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/command-line/
permalink: /docs/beginner/command-line/
---

## Intro to Command Line
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/good-code-practices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/good-code-practices/
permalink: /docs/beginner/good-code-practices/
---

## Good Code Practices
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/good-visual-practices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/good-visual-practices/
permalink: /docs/beginner/good-visual-practices/
---

## Resources
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/installations.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/installations/
permalink: /docs/beginner/installations/
---

## Installations
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/markdown.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/markdown/
permalink: /docs/beginner/markdown/
---

## Intro to Markdown
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/website-code.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/website-code/
permalink: /docs/beginner/website-code/
---

# Website code documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/workflow.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
permalink: /docs/workflow/
permalink: /docs/beginner/workflow/
---

## Workflow
Expand Down
7 changes: 7 additions & 0 deletions docs/good-visual-practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: page
permalink: /docs/good-visual-practices/
---

## Resources
- [Tool](https://ft-interactive.github.io/visual-vocabulary/) to decide which chart to use in which case, and to spark ideas
85 changes: 85 additions & 0 deletions docs/installations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
layout: page
permalink: /docs/installations/
---

## Installations

# Linux
If you use Windows, download [the Linux distro](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
Mac and other OS users can move on to the next step.

WSL, as you will see, will make several installations easier and let you use download instructions typically used only for Macs or other Linux systems like Ubuntu.

# Jekyll
Jekyll is a development tool that lets you generate the site locally, so you can make changes to your Stack post and view it on your browser before publishing it for the world to see.

On a Mac, open Terminal.

On Windows, open WSL and follow these [instructions](https://jekyllrb.com/docs/installation/windows/#installation-via-bash-on-windows-10) first.

Then go ahead and follow the Mac [instructions](https://github.com/dailybruin/the-stack/blob/master/README.md#installation-maclinux) for installation (even for Windows).

# VS Code
VS Code is a powerful text editor that lets you write code in several languages and run them within the application. It's like Microsoft Word for programming.

Follow instructions [here](https://code.visualstudio.com/download).

# Git
Git is a version control tool,

For Windows (or Ubuntu), use the following commands in WSL:

```sh
$ sudo apt-get update
$ sudo apt-get install git
```

> Note for people new to command line: The '$' represents the prompt. So the $ sign must not be included in your command when you type it in, it just separates the commands, so 'sudo apt-get update' and 'sudo apt-get install git' are run one after each other.

For Mac, you can use these [instructions](https://gist.github.com/derhuerst/1b15ff4652a867391f03#installing-git-on-a-mac) to install Homebrew and then Git

Once, installation is done, you can test whether git was intalled:
```sh
$ git --version
```
It should print out something like git version 2.17.1 (or whatever the latest version number is).

Then, you can set your username and password:
```sh
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Media Email"
```
> Make sure to use either your media email, or the email that is being added to the dailybruin github

# (Optional) Python
Python is a very readable, relatively easy to use programming language, and has several libraries that are helpful for data analysis.

On Windows, using WSL, you can run the following commands
```sh
$ sudo apt-get update
$ sudo apt-get install python3.6
```
> Or whatever the latest version of Python is.

Most libraries can be installed in Python using pip:
```sh
$ pip install library_name
```
Newer versions may use this command instead:
```sh
$ python -m pip install library_name
```

On Mac, make sure you have installed [Homebrew](#optional-homebrew) first.
Then, run on Terminal:

```sh
$ brew install python
```

# (Optional) Homebrew
Homebrew is a package manager for Mac. Essentially, it makes it easier for you to download and install software.

Follow [step 1](https://gist.github.com/derhuerst/1b15ff4652a867391f03#installing-git-on-a-mac).

Loading