mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
Update docs
This commit is contained in:
parent
31f9ce5f94
commit
d57fbe46f4
5 changed files with 84 additions and 53 deletions
|
@ -1,14 +1,14 @@
|
|||
# Hugo Academic
|
||||
|
||||
A personal academic website theme for [Hugo](https://gohugo.io).
|
||||
A highly flexible personal website theme for [Hugo](https://gohugo.io).
|
||||
|
||||
[](https://github.com/gcushen/hugo-academic/)
|
||||
|
||||
Key features:
|
||||
|
||||
- Designed for academic staff, students, or general personal use
|
||||
- Includes Biography, Publications, Projects, News/Blog, Teaching, and Contact widgets
|
||||
- Write in [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
|
||||
- Configurable widgets available for Biography, Publications, Projects, News/Blog, Talks, Contact, and Custom
|
||||
- Write in [Markdown](http://gcushen.github.io/hugo-academic-demo/post/writing-markdown-latex/) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
|
||||
- Academic linking (Scholar etc.), [Google Analytics](https://analytics.google.com), and [Disqus](https://disqus.com) comments
|
||||
- Responsive and mobile friendly
|
||||
- Simple and refreshing one page design
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
# An example of using the custom widget to create your own home page section.
|
||||
# An example of using the custom widget to create your own homepage section.
|
||||
# To create more sections, duplicate this file and edit the values below as desired.
|
||||
|
||||
date = "2016-04-20T00:00:00"
|
||||
|
@ -7,12 +7,15 @@ draft = false
|
|||
|
||||
title = "Teaching"
|
||||
subtitle = ""
|
||||
widget = "custom"
|
||||
|
||||
# Order that this section will appear in.
|
||||
weight = 50
|
||||
|
||||
+++
|
||||
|
||||
This is an example of using the *custom* widget to create your own homepage section.
|
||||
|
||||
I am a teaching instructor for the following courses at University X:
|
||||
|
||||
- CS101: An intro to computer science
|
||||
|
|
|
@ -14,12 +14,13 @@ The Academic theme enables you to easily create a beautifully simple academic or
|
|||
|
||||
Key features:
|
||||
|
||||
- Designed for personal and academic staff/student use
|
||||
- Customizable Biography, Publications, Projects, News/Blog, Teaching, and Contact widgets
|
||||
- Write in [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
|
||||
- Designed for academic staff, students, or general personal use
|
||||
- Configurable widgets available for Biography, Publications, Projects, News/Blog, Talks, Contact, and Custom
|
||||
- Write in [Markdown]({{< ref "post/writing-markdown-latex.md" >}}) for easy formatting and code highlighting, with [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics) for mathematical expressions
|
||||
- Academic linking (Scholar etc.), [Google Analytics](https://analytics.google.com), and [Disqus](https://disqus.com) comments
|
||||
- Responsive and mobile friendly
|
||||
- Simple and refreshing one page design
|
||||
- Easy to customize
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -69,17 +70,13 @@ The core parameters for the website can be edited in the `config.toml` configura
|
|||
|
||||
Edit your biography in the *about* widget `content/home/about.md` that you copied across from the `themes/academic/exampleSite/` folder. The research interests and qualifications are stored as `interests` and `education` variables. The academic qualifications are defined as multiples of `[[education.courses]]` and can be created or deleted as necessary. It's possible to completely hide the interests and education lists by deleting their respective variables.
|
||||
|
||||
### Customize homepage widgets
|
||||
### Customize the homepage
|
||||
|
||||
Each widget is responsible for a section on the homepage and contains further parameters that can be edited as desired. The parameters can be found in the preamble/frontmatter (between the pair of `+++`) for each widget located in the `content/home/` folder.
|
||||
|
||||
{{% alert note %}}
|
||||
By default, publications will be displayed in a simple list. If you prefer a more detailed list with abstract and image, you can enable the detailed publication list on the homepage by setting `detailed_list = true` in `content/home/publications.md`.
|
||||
{{% /alert %}}
|
||||
Refer to our guide on using [widgets]({{< ref "post/widgets.md" >}}) to customize your homepage.
|
||||
|
||||
### Add your content
|
||||
|
||||
Refer to our guide on [managing content]({{< ref "post/managing-content.md" >}}) to create your own homepage sections, publications, blog posts, and projects.
|
||||
Refer to our guide on [managing content]({{< ref "post/managing-content.md" >}}) to create your own publications, blog posts, talks, and projects.
|
||||
|
||||
### Remove unused widgets and pages
|
||||
|
||||
|
|
|
@ -6,49 +6,12 @@ title = "Managing content"
|
|||
math = false
|
||||
+++
|
||||
|
||||
This is a brief guide to managing content with the Academic theme. Content can include homepage sections, publications, projects, and news/blog articles. After you have read this guide about creating and managing content, you may also be interested to learn about [writing content with Markdown, LaTeX, and Shortcodes]({{< ref "post/writing-markdown-latex.md" >}}).<!--more-->
|
||||
This is a brief guide to managing content with the Academic theme. Content can include publications, projects, talks, and news/blog articles. After you have read this guide about creating and managing content, you may also be interested to learn about [writing content with Markdown, LaTeX, and Shortcodes]({{< ref "post/writing-markdown-latex.md" >}}).<!--more-->
|
||||
|
||||
To enable LaTeX math rendering for a page, you should include `math = true` in the page's `+++` preamble, as demonstrated in the included example site. Otherwise, to enable math on the homepage or for all pages, you must globally set `math = true` in `config.toml`.
|
||||
|
||||
To display an image in publication, post, or project page headers, you can include the `image = "my-image.jpg"` option in the page `+++` preamble. It is automatically assumed that the image is located in your `static/img/` folder. In the context of posts and projects, the image is intended to behave as a full width banner across the top of the article.
|
||||
|
||||
## Homepage widgets
|
||||
|
||||
The example site includes the following widgets which display as sections on the homepage:
|
||||
|
||||
- About/biography
|
||||
- Selected publications
|
||||
- Recent publications
|
||||
- Recent news/blog posts
|
||||
- Projects
|
||||
- Custom widget (demonstrated with the *teaching* example)
|
||||
- Contact
|
||||
|
||||
### Add a section to the homepage
|
||||
|
||||
You can use the custom widget to create your own home page sections.
|
||||
|
||||
Simply duplicate (copy/paste) and rename the example *teaching* file at `content/home/teaching.md`. Then edit the section title, weight (refer to *Ordering sections* below), and content as desired.
|
||||
|
||||
You may also wish to add a navigation link to the top of the page that points to the new section. This can be achieved by adding something similar to the following lines to your `config.toml`, where the URL will consist of the first title word in lowercase:
|
||||
|
||||
[[menu.main]]
|
||||
name = "Research"
|
||||
url = "#research"
|
||||
weight = 10
|
||||
|
||||
### Remove a section from the homepage
|
||||
|
||||
Note that homepage widgets for publications, projects and posts will automatically hide when there is no content of the respective type.
|
||||
|
||||
Otherwise, if you do not require a particular widget, you can simply delete any associated files from the `content/home/` folder.
|
||||
|
||||
To remove a navigation link from the top of the page, remove the associated `[[menu.main]]` entry in `config.toml`.
|
||||
|
||||
### Ordering sections
|
||||
|
||||
The order that the homepage sections are displayed in is defined by the `weight` parameter in each of the files in the `content/home/` directory. The sections are displayed in ascending order of their `weight`, so you can simply edit the `weight` parameters as desired.
|
||||
|
||||
## Create a publication
|
||||
|
||||
To create a new publication:
|
||||
|
@ -116,10 +79,17 @@ To create a project:
|
|||
|
||||
Then edit the newly created file `content/project/my-project-name.md`. Either you can link the project to an external project website by setting the `external_link = "http://external-project.com"` variable at the top of the file, or you can add content (below the final `+++`) in order to render a project page on your website.
|
||||
|
||||
## Create a talk
|
||||
|
||||
To create a talk:
|
||||
|
||||
hugo new talk/my-talk-name.md
|
||||
|
||||
Then edit the newly created file `content/talk/my-talk-name.md` with your full talk title and details. Note that many of the talk parameters are similar to the publication parameters.
|
||||
|
||||
## Removing content
|
||||
|
||||
Generally, to remove content, simply delete the relevant file from your `content/post`, `content/publication`, `content/project`, or `content/home` folder.
|
||||
Generally, to remove content, simply delete the relevant file from your `content/post`, `content/publication`, `content/project`, or `content/talk` folder.
|
||||
|
||||
## View your updated site
|
||||
|
||||
|
|
61
exampleSite/content/post/widgets.md
Normal file
61
exampleSite/content/post/widgets.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
+++
|
||||
date = "2016-04-20T11:00:00"
|
||||
draft = false
|
||||
tags = ["academic", "hugo"]
|
||||
title = "Customizing the homepage with widgets"
|
||||
math = false
|
||||
summary = """
|
||||
Enable/disable and configure widgets to customize your homepage.
|
||||
"""
|
||||
+++
|
||||
|
||||
Homepage widgets display as sections on the homepage. They can be enabled/disabled and configured as desired. Academic has the following widgets available to use:
|
||||
|
||||
- About/biography
|
||||
- Selected publications
|
||||
- Recent publications
|
||||
- Recent news/blog posts
|
||||
- Projects
|
||||
- Selected talks
|
||||
- Recent talks
|
||||
- Contact
|
||||
- Custom widget (demonstrated with the *teaching* example)
|
||||
|
||||
The example site that you copied to create your site uses all the different types of widget (except talks), so you can generally just delete the widgets you don't need and customize the parameters of the widgets you wish to keep.
|
||||
|
||||
The parameters for each widget vary. They can be found in the preamble/frontmatter (between the pair of `+++`) for each widget installed in the `content/home/` folder.
|
||||
|
||||
{{% alert note %}}
|
||||
By default, publications will be displayed in a simple list. If you prefer a more detailed list with abstract and image, you can enable the detailed publication list on the homepage by setting `detailed_list = true` in `content/home/publications.md`.
|
||||
{{% /alert %}}
|
||||
|
||||
## Add a widget to the homepage
|
||||
|
||||
To add a widget manually, copy the relevant widget from `themes/academic/exampleSite/content/home/` to your `content/home/` folder.
|
||||
|
||||
Widget identifiers are set to their respective filenames, so a `content/home/about.md` widget can be linked from the navigation bar by setting the relevant URL as `"#about"` in `config.toml`.
|
||||
|
||||
This means that if you want to use multiple instances of a widget, each widget will be assigned a unique ID based on the filename that you set. You can then use that ID for linking, like in the above example.
|
||||
|
||||
## Using the custom widget
|
||||
|
||||
You can use the custom widget to create your own home page sections.
|
||||
|
||||
Simply duplicate (copy/paste) and rename the example *teaching* file at `content/home/teaching.md`. Then edit the section title, weight (refer to *Ordering sections* below), and content as desired.
|
||||
|
||||
You may also wish to add a navigation link to the top of the page that points to the new section. This can be achieved by adding something similar to the following lines to your `config.toml`, where the URL will consist of the first title word in lowercase:
|
||||
|
||||
[[menu.main]]
|
||||
name = "Research"
|
||||
url = "#research"
|
||||
weight = 10
|
||||
|
||||
## Remove a widget from the homepage
|
||||
|
||||
If you do not require a particular widget, you can simply delete any associated files from the `content/home/` folder.
|
||||
|
||||
To remove a navigation link from the top of the page, remove the associated `[[menu.main]]` entry in `config.toml`.
|
||||
|
||||
## Ordering widgets
|
||||
|
||||
The order that the homepage widgets are displayed in is defined by the `weight` parameter in each of the files in the `content/home/` directory. The widgets are displayed in ascending order of their `weight`, so you can simply edit the `weight` parameters as desired.
|
Loading…
Add table
Add a link
Reference in a new issue