Skip to content

Commit

Permalink
feat: convert demo front matter from TOML to YAML
Browse files Browse the repository at this point in the history
Unfortunately, the popular Markdown editors (VS Code and Typora) still
don't support the more human-friendly TOML front matter syntax.

Therefore, make it easier to edit content in popular editors by
converting the demo front matter from TOML to YAML.

Except for publications as they are primarily data based (rather than
content based) and are automatically generated by Academic Admin.

Also, continue to use TOML for configuration files.

See #1069
  • Loading branch information
gcushen committed May 6, 2019
1 parent 32e6009 commit 8857bff
Show file tree
Hide file tree
Showing 15 changed files with 290 additions and 385 deletions.
118 changes: 53 additions & 65 deletions exampleSite/content/authors/admin/_index.md
@@ -1,86 +1,74 @@
+++
---
# Display name
name = "Nelson Bighetti"
name: Nelson Bighetti

# Username (this should match the folder name)
authors = ["admin"]
authors:
- admin

# Is this the primary user of the site?
superuser = true
superuser: true

# Role/position
role = "Professor of Artificial Intelligence"
role: Professor of Artificial Intelligence

# Organizations/Affiliations
# Separate multiple entries with a comma, using the form: `[ {name="Org1", url=""}, {name="Org2", url=""} ]`.
organizations = [ { name = "Stanford University", url = "" } ]
organizations:
- name: Stanford University
url: ""

# Short bio (displayed in user profile at end of posts)
bio = "My research interests include distributed robotics, mobile computing and programmable matter."

# Enter email to display Gravatar (if Gravatar enabled in Config)
email = ""

# List (academic) interests or hobbies
interests = [
"Artificial Intelligence",
"Computational Linguistics",
"Information Retrieval"
]

# Organizational groups that you belong to (for People widget)
# Set this to `[]` or comment out if you are not using People widget.
user_groups = ["Researchers", "Visitors"]

# List qualifications (such as academic degrees)
[[education.courses]]
course = "PhD in Artificial Intelligence"
institution = "Stanford University"
year = 2012

[[education.courses]]
course = "MEng in Artificial Intelligence"
institution = "Massachusetts Institute of Technology"
year = 2009

[[education.courses]]
course = "BSc in Artificial Intelligence"
institution = "Massachusetts Institute of Technology"
year = 2008
bio: My research interests include distributed robotics, mobile computing and programmable matter.

interests:
- Artificial Intelligence
- Computational Linguistics
- Information Retrieval

education:
courses:
- course: PhD in Artificial Intelligence
institution: Stanford University
year: 2012
- course: MEng in Artificial Intelligence
institution: Massachusetts Institute of Technology
year: 2009
- course: BSc in Artificial Intelligence
institution: Massachusetts Institute of Technology
year: 2008

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/widgets/#icons
# For an email link, use "fas" icon pack, "envelope" icon, and a link in the
# form "mailto:your-email@example.com" or "#contact" for contact widget.

[[social]]
icon = "envelope"
icon_pack = "fas"
link = "#contact" # For a direct email link, use "mailto:test@example.org".

[[social]]
icon = "twitter"
icon_pack = "fab"
link = "https://twitter.com/GeorgeCushen"

[[social]]
icon = "google-scholar"
icon_pack = "ai"
link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ"

[[social]]
icon = "github"
icon_pack = "fab"
link = "https://github.com/gcushen"

social:
- icon: envelope
icon_pack: fas
link: '#contact' # For a direct email link, use "mailto:test@example.org".
- icon: twitter
icon_pack: fab
link: https://twitter.com/GeorgeCushen
- icon: google-scholar
icon_pack: ai
link: https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ
- icon: github
icon_pack: fab
link: https://github.com/gcushen
# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# [[social]]
# icon = "cv"
# icon_pack = "ai"
# link = "files/cv.pdf"
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# - icon: cv
# icon_pack: ai
# link: files/cv.pdf

+++
# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Organizational groups that you belong to (for People widget)
# Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

Nelson Bighetti is a professor of artificial intelligence at the Stanford AI Lab. His research interests include distributed robotics, mobile computing and programmable matter. He leads the Robotic Neurobiology group, which develops self-reconfiguring robots, systems of self-organizing robots, and mobile sensor networks.

Expand Down
15 changes: 8 additions & 7 deletions exampleSite/content/courses/_index.md
@@ -1,8 +1,9 @@
+++
title = "Courses"
---
title: Courses

# Optional header image (relative to `static/img/` folder).
header:
caption: ""
image: ""
---

# Optional featured image (relative to `static/img/` folder).
[header]
image = ""
caption = ""
+++
37 changes: 19 additions & 18 deletions exampleSite/content/courses/example/_index.md
@@ -1,24 +1,25 @@
+++
---
# Course title, summary, and position.
linktitle = "An Example Course"
summary = "Learn how to use Academic's docs layout for publishing online courses, software documentation, and tutorials."
weight = 1 # Position of this course in course index. Comment out to order by date instead.

# Page title
title = "Overview"

date = 2018-09-09T00:00:00 # Date published
# lastmod = 2018-09-09T00:00:00 # Date modified

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
type = "docs" # Do not modify.
linktitle: An Example Course
summary: Learn how to use Academic's docs layout for publishing online courses, software documentation, and tutorials.
weight: 1

# Page metadata.
title: Overview
date: "2018-09-09T00:00:00Z"
lastmod: "2018-09-09T00:00:00Z"
draft: false # Is this a draft? true/false
toc: true # Show table of contents? true/false
type: docs # Do not modify.

# Add menu entry to sidebar.
[menu.example]
name = "Overview" # Declare this menu item as a parent with ID `name`.
weight = 1 # Position of link in menu.
+++
# - name: Declare this menu item as a parent with ID `name`.
# - weight: Position of link in menu.
menu:
example:
name: Overview
weight: 1
---

## Flexibility

Expand Down
30 changes: 13 additions & 17 deletions exampleSite/content/courses/example/example1.md
@@ -1,22 +1,18 @@
+++
title = "Example Page 1"

date = 2018-09-09T00:00:00 # Date published
# lastmod = 2018-09-09T00:00:00 # Date modified

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
type = "docs" # Do not modify.
---
title: Example Page 1
linktitle: Tips 1-2
toc: true
type: docs
date: "2019-05-05T00:00:00+01:00"
draft: false
menu:
example:
parent: Example Topic
weight: 1

# Prev/next pager order (if `docs_section_pager` enabled in `params.toml`)
weight = 1

# Add menu entry to sidebar.
linktitle = "Tips 1-2" # Menu text - remove to use page title instead.
[menu.example]
parent = "Example Topic" # ID of parent menu entry.
weight = 1 # Position of link in menu.
+++
weight: 1
---

In this tutorial, I'll share my top 10 tips for getting started with Academic:

Expand Down
30 changes: 13 additions & 17 deletions exampleSite/content/courses/example/example2.md
@@ -1,22 +1,18 @@
+++
title = "Example Page 2"

date = 2019-05-05T00:00:00 # Date published
# lastmod = 2018-09-09T00:00:00 # Date modified

draft = false # Is this a draft? true/false
toc = true # Show table of contents? true/false
type = "docs" # Do not modify.
---
title: Example Page 2
linktitle: Tips 3-4
toc: true
type: docs
date: "2019-05-05T00:00:00+01:00"
draft: false
menu:
example:
parent: Example Topic
weight: 2

# Prev/next pager order (if `docs_section_pager` enabled in `params.toml`)
weight = 2

# Add menu entry to sidebar.
linktitle = "Tips 3-4" # Menu text - remove to use page title instead.
[menu.example]
parent = "Example Topic" # ID of parent menu entry.
weight = 2 # Position of link in menu.
+++
weight: 2
---

Here are some more tips for getting started with Academic:

Expand Down
16 changes: 8 additions & 8 deletions exampleSite/content/post/_index.md
@@ -1,14 +1,14 @@
+++
title = "Posts"
---
title: Posts

# View.
# 1 = List
# 2 = Compact
# 3 = Card
view = 2
view: 2

# Optional featured image (relative to `static/img/` folder).
[header]
image = ""
caption = ""
+++
# Optional header image (relative to `static/img/` folder).
header:
caption: ""
image: ""
---

0 comments on commit 8857bff

Please sign in to comment.