Giter Site home page Giter Site logo

homepage's Introduction

Readme

Please find the updated version of our homepage here: https://github.com/cicl-stanford/homepage

Initial setup

Cloning the homepage repo

  • Make a github account here.
  • Ask Ari ([email protected]) or Tobi ([email protected]) to be added as a collaborator to the repo.
  • Open your terminal and navigate to a directory where you'd like to clone the repository.
  • Run this command in your terminal:
git clone --recursive -j8 https://github.com/tobiasgerstenberg/homepage.git
  • Check that you're on the master branch both in the root directory, as well as in the subfolder public.
  • In the root directory, run the following commands:
git branch 
cd public
git branch 
cd ../themes/academic
git branch

You should be on the branch master for all three of them. If not, then type git checkout master to change the branch (in each of the three directories).

Installing hugo

  • First, install homebrew following the instructions here.
  • The current version of the homepage works with hugo version 0.55.5. To install this particular version, run the following commands (see this post for more info).
brew unlink hugo
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2d7e602ad4c26d1d509e5f6c17fd5911323788a3/Formula/hugo.rb

You might get the following error:

Error: Calling Installation of hugo from a GitHub commit URL is disabled! Use 'brew extract hugo' to stable tap on GitHub instead.

in which case run the following commands to install from tap instead (see this thread for more details).

brew unlink hugo
brew tap-new company/team
brew extract --version 0.55.5 hugo company/team
brew install company/team/[email protected]
brew link [email protected]
  • Confirm that hugo version shows v0.55.5.

Folder organization

├── archetypes
├── content
│   ├── home
│   ├── member
│   ├── news
│   └── publication
├── layouts
│   ├── member
│   ├── partials
│   ├── publication
│   ├── section
│   └── shortcodes
├── parser_tests
├── public
│   ├── bibtex
│   ├── categories
│   ├── css
│   ├── cv
│   ├── data
│   ├── demos
│   ├── files
│   ├── home
│   ├── img
│   ├── js
│   ├── member
│   ├── members
│   ├── news
│   ├── papers
│   ├── posters
│   ├── publication
│   ├── publication_types
│   └── tags
├── static
│   ├── bibtex
│   ├── css
│   ├── cv
│   ├── data
│   ├── demos
│   ├── img
│   ├── js
│   ├── papers
│   └── posters
└── themes
    └── academic
  • content: contains markdown files used to render the page

    • home: all widgets displayed on the first page
    • member: individual markdown file for each lab member
    • publication: individual file for each publication
      • these files are generated by the cic parser, and can subsequently be edited
  • static: contains all the files (papers, images, datasets, ...) in several subfolders

How to clone

The hugo setup uses a submodule to differentiate the public facing website from the private developer's side. To clone the repo and appropriately sync the supermodule with the submodule, do the following:

  • Clone the homepage repo here.
  • Delete the "public" folder.
  • Clone the submodule into the homepage folder.
  • Rename the submodule to public.

Update the hompage

If you have any trouble getting things to work, feel free to post an issue on the github repo.

First navigate to the root directory of the homepage in your terminal. To pull the most recent changes from the github repository by running:

bash download.sh 

To submit any changes you've made, run:

bash upload.sh 'message'

Please type a 'message' that communicates what changes you've made.

Add yourself to the homepage

Add your picture

  • Make sure that the image is not too large (ideally smaller than 1mb).
  • Ideally, it should be square.
  • Name the picture firstname_lastname.jpg and put it into static/img/members/.

Add your CV

  • Name your CV firstname_lastname.pdf and put it in static/cv/.

Add your personal page

You can create a new webpage by adding a new markdown file with your name into the content/member/ folder. Just copy the tobias_gerstenberg.md file, rename it, and adapt it to your needs.

Update the people page

In content/home/people.md add yourself as a new member. You can simply copy the template. If you don't have twitter or any of the other services, just leave it empty (e.g. twitter = "").

Add a publication

Update the lab's bibtex file

  • The lab's bibtex file is located here: static/bibtex/cic_papers.bib.
  • Add the bibtex entry of your publication to the file.
  • Make sure to add an abstract to your entry.

Parse the bibtex file to update the homepage

In your terminal, navigate to the root folder and run:

python3 parse_bib_cic.py -i static/bibtex/cic_papers.bib

This will create a new markdown file in the content/publication/ folder for each new publication that was added to the lab's bibdesk repository. The markdown file is named bibentryid.md, for example gerstenberg2016csm.md.

The parser also puts individual .bib files for each publication into static/files/citations/.

Add a pdf of your paper

Add a pdf of your paper to static/papers/ using the same name as the markdown file above (e.g. gerstenberg2016csm.pdf).

Tweak the publication page

Navigate to content/publication/ to open the publication. Adapt the links:

# Links (optional).
url_pdf = "papers/gerstenberg2016csm.pdf"
url_preprint = ""
url_code = ""
url_dataset = ""
url_project = ""
url_slides = "https://link_to_slides.pdf"
url_video = ""
url_poster = ""
url_source = ""

You can also generate new links by changing url_custom = [] to

url_custom = [
{name = "link_name1", url = "url1"},
{name = "link_name2", url = "url2"}
]

You can also add an image to go with the paper by putting it into static/img/publications/ and linking to by adapting the image ="" parameter (e.g. image ="publications/gerstenberg2016csm.png").

Develop the page

Here is a list of the key files to play around with:

  • config.toml: Configuration file
    • navigation bar
    • what's displayed on home page
  • homepage/layouts:
    • contains subfolders with files to adapt the different widgets and pages
  • /static/css/custom.css:
    • css file to adapt any of the stylings

Test the page

Monkeys help us test for broken links: https://monkeytest.it/

Some useful things to know

Commenting

  • html: <-- comment -->
  • markdown: # comment
  • css: /* comment */
  • hugo: // comment

Bibtex

  • For the abstracts in the bibtex files, make sure to typeset " as '' (i.e. with two separate quote marks). Otherwise, the metadata in the corresponding publication.md file is incorrect.

Tutorial links

To do list

  • define personal variables only on people page

homepage's People

Contributors

aribeller avatar sarahawu avatar tobiasgerstenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

homepage's Issues

Update the parser's treatment of the publication_types array

Change the section of the parser that writes the publication_types array to file, so that it correctly ascribes the publication category ('article', 'inproceedings', 'incollection') as well as whether or not the paper is forthcoming.

To check whether the paper is forthcoming, check the year field of the bibtex entry. If the year is an actual year, it is not forthcoming, otherwise its forthcoming status is the same as the value of the year field.

add some fluff to make the page more interesting

  • maybe some more information about some of the projects that our lab works on (this could be a separate project section on the page)
  • add some animations / illustrations for the different projects
  • the goal is to make the site more interesting for strong undergraduates who might want to work in the lab as research assistants

Github icon overlaps Picture

When in fullscreen mode, if you hover over the github icon for some lab members it overlaps the picture. Relatedly, different people seem to have different margins between their pictures and their icons. It would be good to make it so that everyone has the same spacing and there is no overlap.

author name with *

  • when filtering for an author, e.g. "T. Gerstenberg" it should also include "T. Gerstenberg*"
  • stars are used to indicate joint first authorship

Multiple Author Names for publication filter

It would be nice if the publication names that we use to filter the list of publications on a particular member's name could have many possible values, not just a single string. Would be particularly helpful for cases where we want the site to recognize both the author's name and the name with an * denoting joint first author.

Played around with this for a little while but got kind of stuck.

lab member filter on publication page

it would be nice to add a third filter which allows to display publications only be a specific lab member (this won't be useful just now, but later once there are more lab members :) )

handle forthcoming papers

  • show forthcoming papers that are either submitted, accepted, or in press at the top of the publication list
  • instead of the date, display the respective text instead
  • how to handle this:
    • categorize these papers as Forthcoming (i.e. use value 3 in publication_types as stated in in config.toml line 140)
    • then use an if-statement in homepage/layouts/partials/publication_li_apa.html (line 8) to either display the year, or (if publication type is 3) display the text instead

parser issues

just tried the parser and from this bibtex entry:

@article{gerstenberg2019interesting,
	Author = {Tobias Gerstenberg},
	Title = {Interesting paper},
	Year = {{submitted}}}

it generated the following markdown file:

+++
title = "Interesting paper"
date = "submitted-01-01"
authors = ["T. Gerstenberg"]
publication_types = ["2"]
publication = "Gerstenberg T. (submitted). Interesting paper."
image_preview = ""
selected = false
projects = []
#url_pdf = "papers/gerstenberg2019interesting.pdf"
url_preprint = ""
url_code = ""
url_dataset = ""
url_slides = ""
url_video = ""
url_poster = ""
url_source = ""
#url_custom = [{name = "Github", url = ""}]
math = true
highlight = true
[header]
# image = "publications/gerstenberg2019interesting.pdf"
caption = ""

here is what should be fixed:

  • given that there was year in the Year = entry of the bibtex file, the date = entry in the markdown file is wrong: date = "submitted-01-01"
  • when there is no year entry, the parser should use today (i.e. the day the parser was run) to generate the date: date = "2018-06-13"
  • for the image field, it should be ending in .png instead of .pdf: # image = "publications/gerstenberg2019interesting.png"
  • and the bottom of the file, we need to display +++ on the last line to indicate that this is the end of the markdown file header

parser issues

  • the date needs to be saved in this format date = "2018-08-15" rather than date = "2018-8-15" (i.e. day and month need to be specified with two numbers)
  • parser doesn't automatically create a year = entry for publications that have {submitted} in their date field

set titles for publications filters

  • modify layouts/section/publication.html so that it displays a title above the two filters

screen shot 2018-06-12 at 20 44 05

  • it should say Publication above the first filter, and Year above the second

publication formatting

nitpicky thing:

image

note how the is a hanging indent for the first line of each publication. it would be nice if these were left-aligned (and flush -- i.e. no indent).

update homepage to work with most recent version of hugo

the homepage cannot be built under the current version of hugo (hugo 0.58.3). i've installed hugo 0.55.5 (and building the page works with this version).

to install the legacy version of hugo, i've used the trick posted here: https://www.fernandomc.com/posts/brew-install-legacy-hugo-site-generator/

in my case, i ran this command:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2d7e602ad4c26d1d509e5f6c17fd5911323788a3/Formula/hugo.rb

update publication filters

  • currently, there are filters for year and publication type
  • we want an additional filter for author:
    • the options should be based on the lab members as defined in line 38 of config.toml

publication types

  • it would be nice to be able to use words instead of numbers for the publications types
  • currently, the publications types are accessed as an array (which means i have to remember that 0 is 'Thesis' etc
  • they are defined in line 136 of config.toml
publication_types = [
		'Thesis',  # 0
		'Conference proceedings',  # 1
		'Journal',  # 2
		'Forthcoming',  # 3
		'Technical report',  # 4
		'Book',  # 5
		'Book chapter',  # 6
		'Preprint'  # 7
	]
  • even if we keep this array, the current ordering doesn't make much sense (and some of the numbers we don't need
  • this order would be better (although it's presumably somewhat annoying to change all the entries in the *.md files for the different publications):
publication_types = [
		'Forthcoming',  # 0
		'Preprint' # 1
		'Journal',  # 2
		'Conference Proceedings',  # 3
		'Book chapter',  # 4
		'Thesis'  # 5
	]

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.