Add/modify config.toml settings to customize homepage language and recent publication/post counts. Refer to exampleSite/config.toml for changes.

This commit is contained in:
George Cushen 2016-05-24 22:20:08 +01:00
commit d03e66c7f9
4 changed files with 161 additions and 97 deletions

View file

@ -12,106 +12,137 @@ googleAnalytics = ""
[params] [params]
name = "Lena Smith" name = "Lena Smith"
role = "Professor of Artificial Intelligence" role = "Professor of Artificial Intelligence"
organization = "Stanford University" organization = "Stanford University"
email = "test@example.org"
address = "Stanford AI Lab, Stanford University, California, 90210, USA."
phone = "888 888 88 88"
# Date format (refer to Go's date format: http://flippinggodateformat.com )
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "Mon, Jan 2, 2006"
# Enable global LaTeX math rendering? If false, you can enable it locally on a per page basis.
math = false
# Link custom CSS and JS assets (relative to /static/css and /static/js respectively)
custom_css = []
custom_js = []
# Biography section.
# Section will only be displayed if `content/home/about.md` exists.
[params.about]
interests = ["Artificial Intelligence", "Computational Linguistics", "Information Retrieval"] interests = ["Artificial Intelligence", "Computational Linguistics", "Information Retrieval"]
email = "test@example.org" str_interests = "Interests"
address = "Stanford AI Lab, Stanford University, California, 90210, USA." str_education = "Education"
phone = "888 888 88 88"
# Date format (refer to Go's date format: http://flippinggodateformat.com ) [[params.about.education]]
# Examples: "Mon, Jan 2, 2006" or "2006-01-02" course = "PhD in Artificial Intelligence"
date_format = "Mon, Jan 2, 2006" institution = "Stanford University"
year = 2012
# Enable global LaTeX math rendering? If false, you can enable it locally on a per page basis. [[params.about.education]]
math = false course = "MEng in Artificial Intelligence"
institution = "Massachusetts Institute of Technology"
year = 2009
# Link custom CSS and JS assets (relative to /static/css and /static/js respectively) [[params.about.education]]
custom_css = [] course = "BSc in Artificial Intelligence"
custom_js = [] institution = "Massachusetts Institute of Technology"
year = 2008
[[params.education]] # Publications section.
course = "PhD in Artificial Intelligence" # Section will only be displayed if there are publications in `content/publication/`.
institution = "Stanford University" [params.publications]
year = 2012 count = 10
title = "Recent Publications"
subtitle = ""
str_all = "More Publications"
[[params.education]] # Posts section.
course = "MEng in Artificial Intelligence" # Section will only be displayed if there are posts in `content/post/`.
institution = "Massachusetts Institute of Technology" [params.posts]
year = 2009 count = 5
title = "Recent Posts"
subtitle = ""
str_all = "More Posts"
str_read_more = "Read more"
[[params.education]] # Projects section.
course = "BSc in Artificial Intelligence" # Section will only be displayed if there are projects in `content/project/`.
institution = "Massachusetts Institute of Technology" [params.projects]
year = 2008 title = "Projects"
subtitle = ""
[params.contact] # Contact section.
# Automatically link email and phone? [params.contact]
autolink = true enable = true
title = "Contact"
subtitle = ""
autolink = true # Automatically link email and phone?
# Social/Academic Networking # Social/Academic Networking
# #
# Icon pack "fa" includes the following social network icons: # Icon pack "fa" includes the following social network icons:
# twitter, weibo, linkedin, github, facebook, pinterest, google-plus, youtube, instagram, soundcloud # twitter, weibo, linkedin, github, facebook, pinterest, google-plus, youtube, instagram, soundcloud
# For email icon, use "fa" icon pack, "envelope" icon, and "mailto:your@email.com" as the link. # For email icon, use "fa" icon pack, "envelope" icon, and "mailto:your@email.com" as the link.
# Full list: https://fortawesome.github.io/Font-Awesome/icons/ # Full list: https://fortawesome.github.io/Font-Awesome/icons/
# #
# Icon pack "ai" includes the following academic network icons: # Icon pack "ai" includes the following academic network icons:
# google-scholar, arxiv, orcid, researchgate, mendeley # google-scholar, arxiv, orcid, researchgate, mendeley
# Full list: https://jpswalsh.github.io/academicons/ # Full list: https://jpswalsh.github.io/academicons/
[[params.social]] [[params.social]]
icon = "envelope" icon = "envelope"
icon_pack = "fa" icon_pack = "fa"
link = "mailto:test@example.org" link = "mailto:test@example.org"
[[params.social]] [[params.social]]
icon = "twitter" icon = "twitter"
icon_pack = "fa" icon_pack = "fa"
link = "//twitter.com/GeorgeCushen" link = "//twitter.com/GeorgeCushen"
[[params.social]] [[params.social]]
icon = "google-scholar" icon = "google-scholar"
icon_pack = "ai" icon_pack = "ai"
link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ" link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ"
[[params.social]] [[params.social]]
icon = "github" icon = "github"
icon_pack = "fa" icon_pack = "fa"
link = "//github.com/gcushen" link = "//github.com/gcushen"
# Navigation Links # Navigation Links
# # The weight parameter defines the order that the links will appear in.
# The weight parameter defines the order that the links will appear in.
[[menu.main]] [[menu.main]]
name = "Home" name = "Home"
url = "#top" url = "#top"
weight = 1 weight = 1
[[menu.main]] [[menu.main]]
name = "Publications" name = "Publications"
url = "#publications" url = "#publications"
weight = 2 weight = 2
[[menu.main]] [[menu.main]]
name = "Posts" name = "Posts"
url = "#posts" url = "#posts"
weight = 3 weight = 3
[[menu.main]] [[menu.main]]
name = "Projects" name = "Projects"
url = "#projects" url = "#projects"
weight = 4 weight = 4
[[menu.main]] [[menu.main]]
name = "Teaching" name = "Teaching"
url = "#teaching" url = "#teaching"
weight = 5 weight = 5
[[menu.main]] [[menu.main]]
name = "Contact" name = "Contact"
url = "#contact" url = "#contact"
weight = 6 weight = 6

View file

@ -22,13 +22,21 @@
<section id="publications" class="home-section"> <section id="publications" class="home-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 section-heading">
<h1>Recent Publications</h1> <h1>{{ with .Site.Params.publications.title }}{{ . | markdownify }}{{ end }}</h1>
<p><a href="{{ .Site.BaseURL }}publication/">More Publications <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p> {{ with .Site.Params.publications.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $pubs_len .Site.Params.publications.count }}
<p class="view-all">
<a href="{{ .Site.BaseURL }}publication/">
{{ with .Site.Params.publications.str_all }}{{ . | markdownify }}{{ end }}
<i class="fa fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div> </div>
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
<ul class="fa-ul"> <ul class="fa-ul">
{{ range $index, $page := first 10 (where .Data.Pages "Type" "publication") }} {{ range $index, $page := first .Site.Params.publications.count (where .Data.Pages "Type" "publication") }}
<li itemscope itemtype="http://schema.org/CreativeWork"> <li itemscope itemtype="http://schema.org/CreativeWork">
<i class="fa-li fa fa-file-text-o pub-icon" aria-hidden="true"></i> <i class="fa-li fa fa-file-text-o pub-icon" aria-hidden="true"></i>
<span itemprop="name">{{ .Title }}</span> <span itemprop="name">{{ .Title }}</span>
@ -49,12 +57,20 @@
<section id="posts" class="home-section"> <section id="posts" class="home-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 section-heading">
<h1>Posts</h1> <h1>{{ with .Site.Params.posts.title }}{{ . | markdownify }}{{ end }}</h1>
<p><a href="{{ .Site.BaseURL }}post/">More Posts <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p> {{ with .Site.Params.posts.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $posts_len .Site.Params.posts.count }}
<p class="view-all">
<a href="{{ .Site.BaseURL }}post/">
{{ with .Site.Params.posts.str_all }}{{ . | markdownify }}{{ end }}
<i class="fa fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div> </div>
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
{{ range first 5 (where .Data.Pages "Type" "post") }} {{ range first .Site.Params.posts.count (where .Data.Pages "Type" "post") }}
<div class="article-list-item" itemscope="" itemprop="blogPost"> <div class="article-list-item" itemscope="" itemprop="blogPost">
<h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3> <h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
{{ partial "article_metadata" (dict "content" . "is_list" 1) }} {{ partial "article_metadata" (dict "content" . "is_list" 1) }}
@ -66,7 +82,9 @@
{{ end }} {{ end }}
</p> </p>
<p class="read-more"> <p class="read-more">
<a href="{{ .Permalink }}" class="btn btn-primary btn-outline">Read more</a> <a href="{{ .Permalink }}" class="btn btn-primary btn-outline">
{{ with .Site.Params.posts.str_read_more }}{{ . | markdownify }}{{ end }}
</a>
</p> </p>
</div> </div>
{{ end }} {{ end }}
@ -83,8 +101,9 @@
<section id="projects" class="home-section"> <section id="projects" class="home-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 section-heading">
<h1>Projects</h1> <h1>{{ with .Site.Params.projects.title }}{{ . | markdownify }}{{ end }}</h1>
{{ with .Site.Params.projects.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
</div> </div>
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
<ul class="fa-ul"> <ul class="fa-ul">
@ -127,8 +146,9 @@
<section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section"> <section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 section-heading">
<h1>{{ title $page.Title }}</h1> <h1>{{ title $page.Title }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
</div> </div>
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
{{ $page.Content }} {{ $page.Content }}
@ -141,11 +161,13 @@
<!-- Contact Section --> <!-- Contact Section -->
{{ if .Site.Params.contact.enable }}
<section id="contact" class="home-section"> <section id="contact" class="home-section">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-4"> <div class="col-xs-12 col-md-4 section-heading">
<h1>Contact</h1> <h1>{{ with .Site.Params.contact.title }}{{ . | markdownify }}{{ end }}</h1>
{{ with .Site.Params.contact.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
</div> </div>
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
{{ partial "home_contact.html" . }} {{ partial "home_contact.html" . }}
@ -153,7 +175,7 @@
</div> </div>
</div> </div>
</section> </section>
{{ end }}
<!-- Page Footer --> <!-- Page Footer -->
{{ partial "footer_container.html" . }} {{ partial "footer_container.html" . }}

View file

@ -7,7 +7,7 @@
<div class="portrait-title"> <div class="portrait-title">
<h2 itemprop="name">{{ .Site.Params.name }}</h2> <h2 itemprop="name">{{ .Site.Params.name }}</h2>
<h3 itemprop="jobTitle">{{ .Site.Params.role }}</h3> <h3 itemprop="jobTitle">{{ .Site.Params.role }}</h3>
<h3 itemprop="worksFor">{{ .Site.Params.organization }}</h3> {{ with .Site.Params.organization }}<h3 itemprop="worksFor">{{ . }}</h3>{{ end }}
</div> </div>
<ul class="social-icon"> <ul class="social-icon">
@ -35,22 +35,22 @@
<div class="row"> <div class="row">
{{ if isset .Site.Params "interests" }} {{ if isset .Site.Params.about "interests" }}
<div class="col-md-5"> <div class="col-md-5">
<h3>Interests</h3> <h3>{{ with .Site.Params.about.str_interests }}{{ . | markdownify }}{{ end }}</h3>
<ul> <ul>
{{ range .Site.Params.interests }} {{ range .Site.Params.about.interests }}
<li>{{ . }}</li> <li>{{ . }}</li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
{{ end }} {{ end }}
{{ if isset .Site.Params "education" }} {{ if isset .Site.Params.about "education" }}
<div class="col-md-7"> <div class="col-md-7">
<h3>Education</h3> <h3>{{ with .Site.Params.about.str_education }}{{ . | markdownify }}{{ end }}</h3>
<ul class="ul-edu fa-ul"> <ul class="ul-edu fa-ul">
{{ range .Site.Params.education }} {{ range .Site.Params.about.education }}
<li> <li>
<i class="fa-li fa fa-graduation-cap"></i> <i class="fa-li fa fa-graduation-cap"></i>
<div class="description"> <div class="description">

View file

@ -160,6 +160,17 @@ pre {
background-color: rgb(247, 247, 247); background-color: rgb(247, 247, 247);
} }
.section-heading h1 {
margin: 0 0 10px 0;
}
.section-heading p {
font-family: 'Lato', sans-serif;
font-weight: 400;
font-size: 1.1rem;
color: #b2b2b2;
}
/************************************************* /*************************************************
* Biography * Biography
**************************************************/ **************************************************/