diff --git a/branch-off.sh b/branch-off.sh new file mode 100644 index 000000000..01e564db1 --- /dev/null +++ b/branch-off.sh @@ -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 diff --git a/docs/advanced/frontend.md b/docs/advanced/frontend.md index 5fd8a2b78..3a4238b01 100644 --- a/docs/advanced/frontend.md +++ b/docs/advanced/frontend.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/frontend/ +permalink: /docs/advanced/frontend/ --- # Summary diff --git a/docs/beginner/apis.md b/docs/beginner/apis.md index b56823a69..831988405 100644 --- a/docs/beginner/apis.md +++ b/docs/beginner/apis.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/apis/ +permalink: /docs/beginner/apis/ --- ## What Are APIs? diff --git a/docs/beginner/chartjs.md b/docs/beginner/chartjs.md index 74971192c..7a69a5019 100644 --- a/docs/beginner/chartjs.md +++ b/docs/beginner/chartjs.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/chartjs/ +permalink: /docs/beginner/chartjs/ --- ## ChartJS diff --git a/docs/beginner/command-line.md b/docs/beginner/command-line.md index e781762e0..74b4063d2 100644 --- a/docs/beginner/command-line.md +++ b/docs/beginner/command-line.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/command-line/ +permalink: /docs/beginner/command-line/ --- ## Intro to Command Line diff --git a/docs/beginner/good-code-practices.md b/docs/beginner/good-code-practices.md index fd8af2310..0b7019872 100644 --- a/docs/beginner/good-code-practices.md +++ b/docs/beginner/good-code-practices.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/good-code-practices/ +permalink: /docs/beginner/good-code-practices/ --- ## Good Code Practices diff --git a/docs/beginner/good-visual-practices.md b/docs/beginner/good-visual-practices.md index 980d671ce..abadf2ec2 100644 --- a/docs/beginner/good-visual-practices.md +++ b/docs/beginner/good-visual-practices.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/good-visual-practices/ +permalink: /docs/beginner/good-visual-practices/ --- ## Resources diff --git a/docs/beginner/installations.md b/docs/beginner/installations.md index b6f3dd5d1..95976561a 100644 --- a/docs/beginner/installations.md +++ b/docs/beginner/installations.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/installations/ +permalink: /docs/beginner/installations/ --- ## Installations diff --git a/docs/beginner/markdown.md b/docs/beginner/markdown.md index 64926df33..44ad98954 100644 --- a/docs/beginner/markdown.md +++ b/docs/beginner/markdown.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/markdown/ +permalink: /docs/beginner/markdown/ --- ## Intro to Markdown diff --git a/docs/beginner/website-code.md b/docs/beginner/website-code.md index 22ed35464..63e706c1e 100644 --- a/docs/beginner/website-code.md +++ b/docs/beginner/website-code.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/website-code/ +permalink: /docs/beginner/website-code/ --- # Website code documentation diff --git a/docs/beginner/workflow.md b/docs/beginner/workflow.md index c53bebf58..af216529e 100644 --- a/docs/beginner/workflow.md +++ b/docs/beginner/workflow.md @@ -1,6 +1,6 @@ --- layout: page -permalink: /docs/workflow/ +permalink: /docs/beginner/workflow/ --- ## Workflow diff --git a/docs/good-visual-practices.md b/docs/good-visual-practices.md new file mode 100644 index 000000000..980d671ce --- /dev/null +++ b/docs/good-visual-practices.md @@ -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 \ No newline at end of file diff --git a/docs/installations.md b/docs/installations.md new file mode 100644 index 000000000..b6f3dd5d1 --- /dev/null +++ b/docs/installations.md @@ -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). + diff --git a/docs/md-gen.py b/docs/md-gen.py new file mode 100644 index 000000000..53edc9913 --- /dev/null +++ b/docs/md-gen.py @@ -0,0 +1,419 @@ +import json + +input_path = "authors.json" +output_path = "../_profiles/" + +authors = { + "harrison_liddiard": { + "name": "Harrison Liddiard", + "title": "Chief Data Nerd Emeritus", + "bio": "Harrison was the 2015–2016 data editor at the Daily Bruin. He studied linguistics and computer science at UCLA and has interned as a CMS developer at The New York Times. When he's not data-nerding, he enjoys casual Web-apping, design, scuba diving, pretending he's good at musical instruments and planning retreats.", + "mug": "Yes", + "twitter": "HLiddiard", + "email": "hliddiard@media.ucla.edu", + "github": "liddiard", + "website": "https://harrisonliddiard.com" + }, + "neil_bedi": { + "name": "Neil Bedi", + "title": "Beditor in Chief", + "bio": "Neil is the creator of The Stack and was the data editor in 2014-2015. He was also a Daily Bruin Photo editor and a member of the Editorial Board. He currently works as an analyst at JPMorgan. He loves journalism, creating data visualizations, [reminding people of their own mortality](https://chrome.google.com/webstore/detail/motivation/kcngcjbgnnhcdgnaonkmjheanflddmpo) and a good beard.", + "mug": "Yes", + "email": "nbedi@media.ucla.edu", + "twitter": "_neilbedi", + "github": "nbedi", + "website": "http://neilbedi.com" + }, + "katie_shepherd": { + "name": "Katie Shepherd", + "title": "Data Reporter Extraordinare", + "bio": "Katie was a reporter, editor and developer for the Daily Bruin, serving as an assistant News editor and an assistant Opinion editor. She's worked at the Los Angeles Times and is currently pursuing a master's degree at the Columbia University Graduate School of Journalism. She's passionate about policy, government, Netflix marathons and spicy wasabi peas.", + "mug": "Yes", + "email": "kshepherd@media.ucla.edu", + "twitter": "katemshepherd", + "github": "ksheps", + "website": "http://katiemshepherd.com" + }, + "byron_lutz": { + "name": "Byron Lutz", + "title": "Data Sage", + "bio": "Byron is the creator of the Daily Bruin's Online department. He's worked on countless projects for The Bruin including [a website](https://github.com/dailybruin/gryphondor), [a social media manager](https://github.com/dailybruin/meow/) and [a reporting project in the Philippines](http://yolanda.dailybruin.com). He currently works as a software developer at [Factual](https://factual.com) in Los Angeles. He loves UniCamp (like a lot), experimenting with hairstyles and [holding watermelons](https://www.facebook.com/photo.php?fbid=10203809355127941&set=a.1522595138443.2073979.1041533851&type=1&permPage=1).", + "mug": "Yes", + "email": "byronlutz@gmail.com", + "twitter": "byronlutz", + "github": "blutz", + "website": "https://blutz.github.io/" + }, + "tim_guo": { + "name": "Tim Guo", + "title": "D3 Magnate", + "bio": "Tim was a developer for the Daily Bruin. He's worked at Hulu and is currently studying computer science at Brown University. His interests include photography and psychology. He considers his greatest skill his ability to consume apples whole.", + "mug": "Yes", + "email": "tguo@media.ucla.edu", + "twitter": "timguoqk", + "github": "timguoqk", + "website": "http://timguoqk.me" + }, + "nick_yu": { + "name": "Nick Yu", + "title": "Honorary Councilmember Editor", + "bio": "A microbiology, immunology and molecular genetics student, Nick covers Gene Block and his crew in addition to campus politics, which means he enjoys spending his Tuesday nights at Kerckhoff 417, where USAC meets. He has no idea what he wants to do with his life, but he likes writing and has an interest in studying viruses. He's a master of the top-button-unbuttoned-with-tie-and-boutonniere look.", + "mug": "Yes", + "email": "nyu1@media.ucla.edu", + "twitter": "NickYu96" + }, + "angie_wang": { + "name": "Angie Wang", + "title": "Executive Newsinator", + "bio": "Angie is the News editor at the Daily Bruin. She was previously an assistant Photo editor and News contributor. This summer, she reported on undocumented student access to higher education on a national level. She studies communication with a specialization in computing and has a complicated relationship with tomatoes.", + "mug": "Yes", + "email": "angiewang@media.ucla.edu", + "twitter": "angiezwang" + }, + "tyson_ni": { + "name": "Tyson Ni", + "title": "Data Viz Apprentice", + "bio": "Tyson likes telling stories with data. Feel free to send him feedback, data, or story ideas.", + "mug": "Yes", + "email": "tni@ucla.edu", + "github": "tyson-ni" + }, + "ryan_leou": { + "name": "Ryan Leou", + "title": "Daily Bruin Reporter", + "bio": "Ryan is the national news and higher education editor for the Daily Bruin. He studies political and environmental science. In his free time, he enjoys browsing Wikipedia, napping, traveling around the world and compiling data about elections.", + "mug": "Yes", + "email": "rleou@media.ucla.edu", + "twitter": "rleou" + }, + "chang_liu": { + "name": "Chang Liu", + "title": "Stack Editor", + "bio": "Chang is currently the guy in charge of this website. He studies Linguistics & Computer Science at UCLA. When he's not busy learning both natural and programming languages, he likes to take photos, dance and travel.", + "mug": "Yes", + "email": "chliu@media.ucla.edu", + "github": "shampliu", + "website": "http://changliu.io" + }, + "michael_hull": { + "name": "Michael Hull", + "title": "Assistant Sports Editor", + "bio": "Hull currently covers men's water polo for the Sports section. He was a writer for the track and field team in the spring of 2016, and for the NCAA champion men's water polo team in 2015.", + "mug": "Yes", + "email": "mhull@media.ucla.edu", + "twitter": "michaelchull" + }, + "jeffrey_chan": { + "name": "Jeffrey Chan", + "title": "Stack Developer", + "bio": "Jeffrey is a front end developer who strives to add his own flavor to Daily Bruin webpages. He studies Electrical Engineering at UCLA and has an insatiable curiousity for technology. Outside of his academic coursework, he likes to tinker on personal projects, listen to EDM, and search for LA's finest cuisine.", + "mug": "Yes", + "email": "jchan6@media.ucla.edu", + "twitter": "jeffreyxchan", + "github": "jeffreyxchan" + }, + "carter_wu": { + "name": "Carter Wu", + "title": "Stack Developer", + "bio": "Carter is one of the developers for The Stack. He is currently studying Computer Science and Engineering, and enjoys working with big data. Outside of school, Carter loves to eat delicious food, play sports, and browse Reddit.", + "mug": "Yes", + "email": "xwu@media.ucla.edu", + "github": "xiaoxuwu" + }, + "yiling_liu": { + "name": "Yiling Liu", + "title": "Daily Bruin Contributor", + "bio": "Yiling writes for the Science and Health beat in the Daily Bruin. She studies biochemistry. In her free time, she enjoys watching good music videos like Luhan's \"Lu\".", + "mug": "Yes", + "email": "yliu2@media.ucla.edu" + }, + "natalie_ethell": { + "name": "Natalie Ethell", + "title": "Stack Developer", + "bio": "Natalie is a 4th year computer science major. She has been dancing since she was 5 and enjoys any combination of bagels and dogs.", + "mug": "Yes", + "email": "nethell@media.ucla.edu", + "github": "natalieethell" + }, + "mahir_eusufzai": { + "name": "Mahir Eusufzai", + "title": "Stack Developer", + "bio": "Mahir is a 4th year CS major. He's a huge Lakers fan and occasionally posts piano/guitar videos on YouTube. He is frequently mistaken for Mihir Mathur.", + "mug": "Yes", + "email": "meusufzai@media.ucla.edu" + }, + "fay_wu": { + "name": "Fay Wu", + "title": "Stack Developer", + "bio": "Fay is in her last quarter at UCLA CS and loves oysters.", + "mug": "Yes", + "email": "mfaywu@ucla.edu", + "github": "mfaywu" + }, + "benson_han": { + "name": "Benson Han", + "title": "Casual Programmer", + "bio": "Benson is a 2nd year Computer Science major and is more comfortable writing code than bios.", + "mug": "Yes", + "email": "bhan@media.ucla.edu", + "github": "bensonhan" + }, + "jerry_li": { + "name": "Jerry Li", + "title": "Stack Developer", + "bio": "Jerry is a 3rd year CS major who transforms food into code. When not hacking away or getting lost in data, he likes to play badminton, fold origami, and play board games.", + "mug": "Yes", + "email": "jerrylinew@ucla.edu", + "github": "jerrylinew" + }, + "rupan_bharanidaran": { + "name": "Rupan Bharanidaran", + "title": "News Editor", + "bio": "Bharanidaran is the news editor at the Daily Bruin and a fourth-year political science and economics student. He helped input data from the crime logs and enjoys reading books and analyzing campaign contribution data in his free time.", + "mug": "Yes", + "email": "rbharanidaran@media.ucla.edu" + }, + "madeleine_pauker": { + "name": "Madeleine Pauker", + "title": "Managing Editor", + "bio": "Pauker is the managing editor of the Daily Bruin and a third-year world arts and cultures student. She recorded data from 365 days of crime logs to create this post.", + "mug": "Yes", + "email": "mpauker@media.ucla.edu" + }, + "rishub_kumar": { + "name": "Rishub Kumar", + "title": "Stack Developer", + "bio": "Kumar is a UCLA alumnus and a previous Daily Bruin staffer.", + "mug": "Yes", + "email": "rkumar1@media.ucla.edu" + }, + "dinkar_khattar": { + "name": "Dinkar Khattar", + "title": "Stack Developer", + "bio": "Khattar is a third-year computer science student. He’s probably the guy you see yoyo-ing and/or riding a Bird down Charles E. Young Drive.", + "mug": "Yes", + "email": "dkhattar@media.ucla.edu", + "github": "dkok97" + }, + "henna_dialani": { + "name": "Henna Dialani", + "title": "Stack Developer", + "bio": "Dialani is the 2018-2019 Stack editor and a fourth-year statistics student. When not working with data, she’s exploring Los Angeles and its food.", + "mug": "Yes", + "email": "hdialani@media.ucla.edu", + "github": "hennadialani" + }, + "nathan_smith": { + "name": "Nathan Smith", + "title": "Assistant Online Editor", + "bio": "Smith is an assistant online editor at the Daily Bruin and a second-year computer science student. When he's not scrolling through USAC PDFs or staring at lines of code, he enjoys Eggo waffles, visiting museums and writing about electric scooters.", + "mug": "Yes", + "email": "nsmith@media.ucla.edu", + "github": "nathunsmitty", + "twitter": "nathunsmitty", + "website": "https://nathansmith.io" + }, + "lik_teng_ung": { + "name": "Lik Teng Ung", + "title": "Stack Developer", + "bio": "Ung is a stack contributor at the Daily Bruin and a third-year statistics and political science student. He's an avid political poll watcher, Pythonistas and boba connoisseur.", + "email": "lung@media.ucla.edu", + "mug": "Yes" + }, + "kyle_wong": { + "name": "Kyle Wong", + "title": "Stack Developer", + "bio": "Wong is a third-year computer science student who enjoys attending hackathons.", + "mug": "Yes", + "email": "kwong@media.ucla.edu", + "github": "kylewong975", + "website": "http://kylewong.me" + }, + "alexander_chan": { + "name": "Alexander Chan", + "title": "Stack Developer", + "bio": "Chan is a graduate student in the Statistics Department. He likes stats, a lot. Previously, a software engineering intern at Amazon AWS, American Express, and data science intern at a start-up in France.", + "mug": "Yes", + "email": "achan@media.ucla.edu", + "github": "alexander-chan" + }, + "andrew_kan": { + "name": "Andrew Kan", + "title": "Stack Developer", + "bio": "Kan is a second-year computer science and engineering student who enjoys longforms and any type of puzzle.", + "mug": "Yes", + "email": "akan@media.ucla.edu", + "github": "kandrewz" + }, + "saachi_kudtarkar": { + "name": "Saachi Kudtarkar", + "title": "Stack Developer", + "bio": "Kudtarkar is a third-year mathematics of computation student. She enjoys watching TED talks and eating Veggie Grill, especially at the same time!", + "mug": "Yes", + "email": "skudtarkar@media.ucla.edu", + "github": "saachinator" + }, + "mattie_sanseverino": { + "name": "Mattie Sanseverino", + "title": "Stack Editor", + "bio": "Mattie is a second-year Computer Science student. She loves the ocean and anything that contains too much sugar for her own good.", + "mug": "Yes", + "email": "msanseverino@media.ucla.edu", + "github": "mattiesansev" + }, + "keith_atienza": { + "name": "Keith Atienza", + "title": "Stack Developer", + "bio": "Atienza is a fourth-year applied mathematics and statistics student who loves stand-up comedy and being lit.", + "mug": "Yes", + "email": "katienza@media.ucla.edu", + "github": "atienzak" + }, + "jeanette_lin": { + "name": "Jeanette Lin", + "title": "Stack Developer", + "bio": "Lin is a fourth-year statistics student. Outside of school and data analysis projects, she loves hiking, going to the beach, and drinking boba.", + "mug": "Yes", + "email": "jlin1@media.ucla.edu", + "github": "jeanettelin8" + }, + "michael_huang": { + "name": "Michael Huang", + "title": "Stack Developer", + "bio": "Michael is lit." + }, + "radhika_ahuja": { + "name": "Radhika Ahuja", + "title": "Stack Developer", + "bio": "Radhika is a fourth-year math of computation student. Outside of school, she enjoys writing, dance, cooking, and other things creative.", + "mug": "yes", + "email": "rahuja@media.ucla.edu", + "github": "ahujaradhika", + "website": "https://ahujaradhika.github.io/" + }, + "annie_zhang": { + "name": "Annie Zhang", + "title": "Stack Developer", + "bio": "Annie is a third year math major who really enjoys heist novels, murder mystery TV shows, noodles, and setting unrealistic goals.", + "mug": "yes", + "email": "azhang2@media.ucla.edu", + "github": "aczhang777" + }, + "madeline_blasingame": { + "name": "Madeline Blasingame", + "title": "Stack Developer", + "mug": "yes", + "bio": "Maddy is a first-year stats major whose only goal is to be TikTok famous.", + "email": "mblasingame@media.ucla.edu", + "github": "meblasingame" + }, + "laurel_woods": { + "name": "Laurel Woods", + "title": "Stack Developer", + "bio": "Laurel is a second-year student who's somewhere in between computer science and cognitive science. She loves anything outdoorsy, especially if her dog is there.", + "mug": "Yes", + "email": "lwoods@media.ucla.edu", + "github": "laurelrwoods" + }, + "bernard_mendez": { + "name": "Bernard Mendez", + "title": "Stack Developer/News Reporter", + "bio": "Bernard is a second-year math student. Bernard also writes for the Daily Bruin's science and health section. In his free time, Bernard enjoys wearing sweaters.", + "mug": "Yes", + "email": "bmendez@media.ucla.edu", + "github": "bernardmendez", + "website": "http://bernardmendez.com" + }, + "charlotte_huang": { + "name": "Charlotte Huang", + "title": "Stack Developer", + "bio": "Charlotte is a junior, majoring in Applied Math and Cognitive Science. She always wants to spend a day eating nothing but dark chocolate and drinking lattes with oat milk.", + "mug": "Yes", + "email": "chuang@media.ucla.edu", + "github": "charlotte0408" + }, + "justin_chai": { + "name": "Justin Chai", + "title": "Stack Developer", + "bio": "Justin is a first-year linguisitics and computer science major.", + "mug": "Yes", + "email": "jchai@media.ucla.edu" + }, + "jc_rios": { + "name": "Juan C. Rios", + "title": "Stack Developer", + "email": "jrios@media.ucla.edu", + "bio": "Rios is a third-year Computer Engineering student who enjoys programming and music.", + "mug": "yes" + }, + "kelly_chen": { + "name": "Kelly Chen", + "title": "Stack Developer", + "email": "kchen2@media.ucla.edu", + "bio": "Chen is a second-year statistics student. She can usually be found dancing, even when she's not supposed to, and is always looking for her next adventure.", + "mug": "yes" + }, + "keri_chen": { + "name": "Keri Chen", + "title": "Stack Developer", + "email": "kchen1@media.ucla.edu", + "bio": "Chen is a first-year sociology student. When not writing essays and articles, she enjoys watching Vox videos and takes pride in being able to pack for two weeks in a single carry-on.", + "mug": "yes" + }, + "sydney_kovach": { + "name": "Sydney Kovach", + "title": "Stack Developer", + "email": "skovach@media.ucla.edu", + "mug": "yes", + "bio": "Sydney Kovach is a second year Global Studies and Geography student who loves dancing and taking yoga classes in her free time." + } +} + +for author in authors: + author_key = str(author) + output = """--- +name: {} +title: {}""".format(authors[author]['name'], authors[author]['title']) + + try: + output = output + """ +email: {}""".format(authors[author]['email']) + except: + pass + + try: + output = output + """ +mug: {}""".format(authors[author]['mug']) + except: + pass + + try: + output = output + """ +bio: {}""".format(authors[author]['bio']) + except: + pass + + try: + output = output + """ +github: {}""".format(authors[author]['github']) + except: + pass + + try: + output = output + """ +website: {}""".format(authors[author]['website']) + except: + pass + + try: + output = output + """ +mug: {}""".format(authors[author]['twitter']) + except: + pass + + output = output + """ +---""" + + print(output) + with open(output_path + author + '.md', 'w') as f: + f.write(output) \ No newline at end of file diff --git a/docs/usage-and-style.md b/docs/usage-and-style.md new file mode 100644 index 000000000..097c05b67 --- /dev/null +++ b/docs/usage-and-style.md @@ -0,0 +1,140 @@ +--- +layout: page +permalink: /docs/usage-and-style/ +--- + +# Usage documentation and style guidelines + +## Posts + +### Post files + +Posts are located in the `_posts/` directory. To add a post, create a file in +this directory with the filename format: `YYYY-MM-DD-article-url-slug.md` +where `YYYY-MM-DD` is the year, month, and day on which the post will +publish. If you need to change the publish date later, rename this file +accordingly. + +### Post front matter + +All posts begin with [front matter](https://jekyllrb.com/docs/frontmatter/), +which is metadata about the post. Here's an example of what front matter +on a post might look like: + +{% highlight yaml %} +title: A breakdown of USAC student government fees over time +teaser: The number of fees students pay to USAC has increased from two to 17 in the last few decades. We examine where your money has been going. +authors: + - harrison_liddiard +key_takeaways: + - Undergrads will pay $160 to USAC this year. + - New fees result from ballot measures passed by students. + - USAC fees have increased less than tuition has increased. +featured_image: + url: /usac-fee-trend/visualization.svg +og_image: /usac-fee-trend/visualization.png +stylesheets: + - //cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css + - /css/posts/usac-fee-trend/app.css +scripts: + - //cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.js + - //cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.js + - /js/posts/usac-fee-trend/app.js +{% endhighlight %} + +Below is a list of front matter variables used with posts. Value type is string +unless otherwise specified in parentheses. + +- `title`: The main title of a post. Shows up as the