diff --git a/exampleSite/config.toml b/exampleSite/config.toml index aaea6e60..2105eb64 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -12,106 +12,137 @@ googleAnalytics = "" [params] - name = "Lena Smith" - role = "Professor of Artificial Intelligence" - organization = "Stanford University" + name = "Lena Smith" + role = "Professor of Artificial Intelligence" + 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"] - email = "test@example.org" - address = "Stanford AI Lab, Stanford University, California, 90210, USA." - phone = "888 888 88 88" + str_interests = "Interests" + str_education = "Education" - # 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" + [[params.about.education]] + course = "PhD in Artificial Intelligence" + institution = "Stanford University" + year = 2012 - # Enable global LaTeX math rendering? If false, you can enable it locally on a per page basis. - math = false + [[params.about.education]] + 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) - custom_css = [] - custom_js = [] + [[params.about.education]] + course = "BSc in Artificial Intelligence" + institution = "Massachusetts Institute of Technology" + year = 2008 - [[params.education]] - course = "PhD in Artificial Intelligence" - institution = "Stanford University" - year = 2012 + # Publications section. + # Section will only be displayed if there are publications in `content/publication/`. + [params.publications] + count = 10 + title = "Recent Publications" + subtitle = "" + str_all = "More Publications" - [[params.education]] - course = "MEng in Artificial Intelligence" - institution = "Massachusetts Institute of Technology" - year = 2009 + # Posts section. + # Section will only be displayed if there are posts in `content/post/`. + [params.posts] + count = 5 + title = "Recent Posts" + subtitle = "" + str_all = "More Posts" + str_read_more = "Read more" - [[params.education]] - course = "BSc in Artificial Intelligence" - institution = "Massachusetts Institute of Technology" - year = 2008 + # Projects section. + # Section will only be displayed if there are projects in `content/project/`. + [params.projects] + title = "Projects" + subtitle = "" - [params.contact] - # Automatically link email and phone? - autolink = true + # Contact section. + [params.contact] + enable = true + title = "Contact" + subtitle = "" + autolink = true # Automatically link email and phone? - # Social/Academic Networking - # - # Icon pack "fa" includes the following social network icons: - # 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. - # Full list: https://fortawesome.github.io/Font-Awesome/icons/ - # - # Icon pack "ai" includes the following academic network icons: - # google-scholar, arxiv, orcid, researchgate, mendeley - # Full list: https://jpswalsh.github.io/academicons/ + # Social/Academic Networking + # + # Icon pack "fa" includes the following social network icons: + # 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. + # Full list: https://fortawesome.github.io/Font-Awesome/icons/ + # + # Icon pack "ai" includes the following academic network icons: + # google-scholar, arxiv, orcid, researchgate, mendeley + # Full list: https://jpswalsh.github.io/academicons/ - [[params.social]] - icon = "envelope" - icon_pack = "fa" - link = "mailto:test@example.org" + [[params.social]] + icon = "envelope" + icon_pack = "fa" + link = "mailto:test@example.org" - [[params.social]] - icon = "twitter" - icon_pack = "fa" - link = "//twitter.com/GeorgeCushen" + [[params.social]] + icon = "twitter" + icon_pack = "fa" + link = "//twitter.com/GeorgeCushen" - [[params.social]] - icon = "google-scholar" - icon_pack = "ai" - link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ" + [[params.social]] + icon = "google-scholar" + icon_pack = "ai" + link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ" - [[params.social]] - icon = "github" - icon_pack = "fa" - link = "//github.com/gcushen" + [[params.social]] + icon = "github" + icon_pack = "fa" + link = "//github.com/gcushen" # 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]] - name = "Home" - url = "#top" - weight = 1 + name = "Home" + url = "#top" + weight = 1 [[menu.main]] - name = "Publications" - url = "#publications" - weight = 2 + name = "Publications" + url = "#publications" + weight = 2 [[menu.main]] - name = "Posts" - url = "#posts" - weight = 3 + name = "Posts" + url = "#posts" + weight = 3 [[menu.main]] - name = "Projects" - url = "#projects" - weight = 4 + name = "Projects" + url = "#projects" + weight = 4 [[menu.main]] - name = "Teaching" - url = "#teaching" - weight = 5 + name = "Teaching" + url = "#teaching" + weight = 5 [[menu.main]] - name = "Contact" - url = "#contact" - weight = 6 + name = "Contact" + url = "#contact" + weight = 6 diff --git a/layouts/index.html b/layouts/index.html index bf9297c4..4dd0851d 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -22,13 +22,21 @@
-
-

Recent Publications

-

More Publications

+
+

{{ with .Site.Params.publications.title }}{{ . | markdownify }}{{ end }}

+ {{ with .Site.Params.publications.subtitle }}

{{ . | markdownify }}

{{ end }} + {{ if gt $pubs_len .Site.Params.publications.count }} +

+ + {{ with .Site.Params.publications.str_all }}{{ . | markdownify }}{{ end }} + + +

+ {{ end }}
    - {{ range $index, $page := first 10 (where .Data.Pages "Type" "publication") }} + {{ range $index, $page := first .Site.Params.publications.count (where .Data.Pages "Type" "publication") }}
  • {{ .Title }} @@ -49,12 +57,20 @@
    -
    -

    Posts

    -

    More Posts

    +
    +

    {{ with .Site.Params.posts.title }}{{ . | markdownify }}{{ end }}

    + {{ with .Site.Params.posts.subtitle }}

    {{ . | markdownify }}

    {{ end }} + {{ if gt $posts_len .Site.Params.posts.count }} +

    + + {{ with .Site.Params.posts.str_all }}{{ . | markdownify }}{{ end }} + + +

    + {{ end }}
    - {{ range first 5 (where .Data.Pages "Type" "post") }} + {{ range first .Site.Params.posts.count (where .Data.Pages "Type" "post") }}

    {{ partial "article_metadata" (dict "content" . "is_list" 1) }} @@ -66,7 +82,9 @@ {{ end }}

    - Read more + + {{ with .Site.Params.posts.str_read_more }}{{ . | markdownify }}{{ end }} +

    {{ end }} @@ -83,8 +101,9 @@
    -
    -

    Projects

    +
    +

    {{ with .Site.Params.projects.title }}{{ . | markdownify }}{{ end }}

    + {{ with .Site.Params.projects.subtitle }}

    {{ . | markdownify }}

    {{ end }}
      @@ -127,8 +146,9 @@
      -
      +

      {{ title $page.Title }}

      + {{ with $page.Params.subtitle }}

      {{ . | markdownify }}

      {{ end }}
      {{ $page.Content }} @@ -141,11 +161,13 @@ +{{ if .Site.Params.contact.enable }}
      -
      -

      Contact

      +
      +

      {{ with .Site.Params.contact.title }}{{ . | markdownify }}{{ end }}

      + {{ with .Site.Params.contact.subtitle }}

      {{ . | markdownify }}

      {{ end }}
      {{ partial "home_contact.html" . }} @@ -153,7 +175,7 @@
      - +{{ end }} {{ partial "footer_container.html" . }} diff --git a/layouts/partials/home_biography.html b/layouts/partials/home_biography.html index 0a839efe..f1a7c4b7 100644 --- a/layouts/partials/home_biography.html +++ b/layouts/partials/home_biography.html @@ -7,7 +7,7 @@

      {{ .Site.Params.name }}

      {{ .Site.Params.role }}

      -

      {{ .Site.Params.organization }}

      + {{ with .Site.Params.organization }}

      {{ . }}

      {{ end }}