The Liquid language is specified by {% ... %} and {{ ... }}. The first one is used for calling operators like for, if, assign, endif, etc. The latter is used for referencing a variable. More information can be found in the official Liquid documentation.
The site variable is a global variable accessing data specified in _config.yml. For example, site.projects refers to data files in _projects, or site.baseurl refers to the url set in _config.yml.
The page variable refers to the data in the caller file. For example, for the following data file, we have page.pageTitle, page.pageDesc, page.pageDate, and page.content.
---
pageTitle: some Title
pageDesc: some description for the file
pageDate: some date information
---
Some description that is accessed by page.content.
This info can be written in `markdown` format.
More information can be found in the Jekyll website.
There are 5 main pages: index.markdown (home page), gallery.markdown, news.markdown, people.markdown, projects.markdown, and publications.markdown. These main pages are specified in the root of docs_src in markdown files. The format of these files are as follows:
--- layout: <a layout from _layouts>
title: <some title>
permalink: /<the link for the page>/
---
layout specifies the layout on which the page is rendered.
title specifies the title of the page. permalink specifies how the page is accessed. More info can be found in the Jekyll website.
_layouts and _includes are HTML files act as templates that are filled with data.
The main _layout is default which sums up everything in a full HTML page.
It starts by including head.html and header.html from _includes and adding the content of the caller.
Other layouts must identify how to be rendered. That is they should include the following header on top to call the default layout.
---
layout: default
---
The layouts that are called by main pages are:
galleryis called bygallery.markdown. It reads data from_pagedata > galleryPageData.mdhomeis called byindex.markdown. It reads the welcome message and picture from_pagedata > homePageData.md. It also reads data from_posts(as news) and_projects(for research highlights).newsis called bynews.markdown. It reads data from_posts.peopleis called bypeople.markdown. It reads data from_pagedata > peoplePageData.mdand_members. The liquid code inside the page is grouping the members and checking the existence of properties for clean rendering.projectsis called byprojects.markdown. It reads data from_pagedata > projectsPageData.mdand_projects.publicationsis called bypublications.markdownand reads thebibfiles of the_bibliographyand_pagedata > publicationPageData.md
The following layouts are called by data files.
memberis a profile page for each member of the lab. It is called by each member in_membersand reads data from_pagedata > memberPageData.md.postis page dedicated to each piece of news and called by each post in_posts. Currently, there is no accessible link in the website.projectis a project page called by each project in_projects.toolis a page for available tools and reads data from_tools.
The url of the pages are defined in _config.yml as /:collection/:name where :name is the filename (Read more here). That is, for _members > Abc.md, the url of Abc profile is /members/abc. (Note the lowercase abc).
If the page is retrieved by processing the site variable, then its url is {{ site.baseurl }} {{ varName.url }}. For example:
{% for proj in site.projects %}
<a href="{{ site.baseurl }}{{ proj.url }}">More...</a>
{% endfor %}
This directory contains the html pieces of code that are reused and called using {% include ....html %}. Some include files require additional inputs.
custom-head(created by David and not being used in the current version of code)footeris intended to implement a footer and to be included in thedefaultlayout. (not used at the moment`headcontains the head of theHTMLpage. It also includes the scripts for bootstap library.headeris the navigation bar and is included in thedefaultlayout. It reads the navigatin items from_pagedata > navbarItems.mdnewsPanelis the panel for news items inhomeandnewspages. It should be called as{% include newsPanel.html post=X messageThreshold=Y %}peoplePanelis the panel reused inpeoplepage. It should be called as{% include peoplePanel.html person=X %}projectPanelis the panel reused inhomeandprojectspages. It should be called as{% include projectPanel.html project=X highlightTruncateLimit=Y learnMore=Z %}
The only files that are going to be modified regularly are data files.
This directory includes references.bib which is a bib file.
The project property of bibitems is used to filter publications in project pages.
The first and last names of authors are matched against the first and last names of members to filter publications for member pages.
In the current design, all bibitems are called in the publications.html layout.
This directory contains the md files for each member. Each member file should have the following format:
---
layout: member
key:
first_name:
last_name:
level:
status:
title:
start_year:
end_year:
email:
image: /assets/img/team/
website:
twitter:
github:
bib_id:
---
The is the **bio** of the student written in markdown.
Required fields are marked by (Req).
- (Req) The layout should be
member. - (Req)
first_nameandlast_nameare displayed in the website. - (Req)
keyshould be unique. It is used in project files and used inproject.htmllayout to identify project members. - (Req)
levelmust be one of the values used inpeople.htmlpage. Right now there are the following roles:Faculty,PhD,Master,REU, andASSIP. - (Req for non-Faculty members)
statusis eitherstudentoralumni. It is used to sort members inpeoplepage. - (Req)
titleis used to display the title of the member. It is used inpeopleandmemberpages. - (Req for non-Faculty members)
start_yearis the year the student joined the lab. It is used to sort the members inpeoplepage. end_yearis the year the member left the lab. If it is equal tostart_year, it should not be added.emailis not displayed in the website currently.- (Req)
imageproperty are for locating the images of members. All images should be at/assets/img/team/. All characters are case-sensitive, e.g.,jpgis different fromJPG. All images should be squared (e.g., 450*450). Images should have small size for better rendering. If there is no image, then the placeholder image should be added:/assets/img/team/placeHolder.png. website,twitter, andgithubspecify complete links to these external sites.bib_idis the name under which the papers are published. This property is not used currently.- The bio is written in
mdformat. It is displayed inmemberpages.
The directory contains the data files used in differnt pages. These filed are not directly rendered, and they don't need the layout property. To be consistent, they should specified in which page they are being used through for property.
To add a new image, add the reasonably resized image to /assets/img/gallery, and add the location of the image plus a caption to the same index of the images and captions arrays.
The news are stored individually in _posts. The naming convension for the news files is yyyy-mm-dd-<some informative name>.md. The format of each news file is:
---
layout: post
title: Title of the news
date: yyyy-mm-dd hh:mm:ss -0400
categories: jekyll update
---
The description of the news in the markdown format.
The categories property is not used in the current implementation.
In the current design, only the yyyy-mm-ss info of the date is being used.
This directory stores the data of projects, current and old ones. The format of the data files is as follows:
---
layout: project
key:
title:
highlightMediaType:
highlightMediaURL:
highlight:
currentMembers: [memberKey1,memberKey2]
previousMembers: [memberKey3,memberKey4]
active: true
---
layoutmust beprojectkeyis a unique value used in selecting highlights inhomepage.highlightMediaTypeis eitherimageorYouTube. This is used in highlights inhome, allprojects, and individualprojectpages.highlighMediaURLdepending on thehighlightMediaTypeis either the YouTube URL (forYouTube) of the location of an image in/assets/img/research/directory.highlightis a summary of the project. It is displayed onhome, allprojects, and individualprojectpages.currentMembersis an array of members'keys who are currently active in the project.previousMembersis an array of members'keys who previously contributed.activeis a boolean that specifies if the project is currently active or not. It is used to sort projects in allprojectspage.
Assets include css files (imported in _includes > head.html), icons and img. New css files should be added in assets > css and called in head.html.
It includes gallery pictures (e.g., group pictures), research pictures (for projects), and team pictures (for members of the lab).