mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-25 18:50:51 +02:00
Update packaging
This commit is contained in:
parent
b87c12bcf7
commit
5a88899600
4 changed files with 57 additions and 29 deletions
80
README.md
80
README.md
|
@ -6,12 +6,12 @@ A personal academic website theme for [Hugo](https://gohugo.io).
|
|||
|
||||
Key features:
|
||||
|
||||
- Suitable for academic staff, students, or general personal use
|
||||
- Sections for Biography, Publications, Projects, News, Teaching, and Contact
|
||||
- Render LaTeX mathematical expressions and highlight code
|
||||
- Designed for academic staff, students, or general personal use
|
||||
- Includes Biography, Publications, Projects, News/Blog, Teaching, and Contact sections
|
||||
- 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
|
||||
- Academic linking (Scholar etc.), Google Analytics, and Disqus comments
|
||||
- Responsive and mobile friendly
|
||||
- Simple one page design
|
||||
- Clean and refreshing theme
|
||||
- Simple and refreshing one page design
|
||||
- Easy to customize
|
||||
|
||||
## Installation
|
||||
|
@ -23,9 +23,9 @@ Key features:
|
|||
|
||||
2. Install Academic theme with `git`:
|
||||
|
||||
git clone git@github.com:gcushen/hugo-academic.git themes/hugo-academic
|
||||
git clone git@github.com:gcushen/hugo-academic.git themes/academic
|
||||
|
||||
Or alternatively, install by downloading from [Github](https://github.com/gcushen/hugo-academic/) into a `themes/hugo-academic` folder within your Hugo website.
|
||||
Or alternatively, install by downloading from [Github](https://github.com/gcushen/hugo-academic/) into a `themes/academic` folder within your Hugo website.
|
||||
|
||||
3. If you are creating a new website, copy the contents of the `exampleSite` folder to your website root folder, overwriting existing files if necessary. The `exampleSite` folder contains an example config file and content to help you get started.
|
||||
|
||||
|
@ -39,35 +39,36 @@ Key features:
|
|||
|
||||
## Getting Started
|
||||
|
||||
Assuming you created a new website following the installation steps above, this section explores just a few more steps in order to customize it.
|
||||
Assuming you created a new website with the example content following the installation steps above, this section explores just a few more steps in order to customize it.
|
||||
|
||||
### Configuration
|
||||
|
||||
The core parameters for the website can be edited in the `config.toml` configuration file.
|
||||
|
||||
As can be seen in the example `config.toml`, the social/academic networking icons and education qualifications are defined as multiples of `[[params.contact.social]]` and `[[params.education]]` respectively. They can be duplicated or deleted as necessary.
|
||||
As can be seen in the example `config.toml`, the social/academic networking icons and education qualifications are defined as multiples of `[[params.social]]` and `[[params.education]]` respectively. They can be duplicated or deleted as necessary.
|
||||
|
||||
For deployment, the `baseURL` variable can be changed to match your website URL such as `baseURL = "http://yoursite.org/"`. To enable Google Analytics, add your tracking code to `config.toml` similarly to `googleAnalytics = "UA-12345678-9"`.
|
||||
For deployment, the `baseURL` variable can be changed to match your website URL such as `baseURL = "http://yoursite.org/"`. The example Disqus commenting variable should be cleared (e.g. `disqusShortname = ""`) or set to your own Disqus shortname to enable commenting. To enable Google Analytics, add your tracking code in `config.toml` similarly to `googleAnalytics = "UA-12345678-9"`.
|
||||
|
||||
### Biography
|
||||
### Introduce yourself with a biography
|
||||
|
||||
Upload a cropped portrait photo to `static/img/portrait.jpg`, overwriting the default if necessary.
|
||||
Place a cropped portrait photo named `portrait.jpg` into the `static/img/` folder, overwriting any defaults.
|
||||
|
||||
To change the biography text, edit `content/home/about.md` and/or the `param` variables in `config.toml`.
|
||||
Edit your biography in the example `content/home/about.md` file. The research interests and qualifications are stored separately as `param` variables in `config.toml`, as can be seen in the example config.
|
||||
|
||||
### Create a publication
|
||||
|
||||
To create a new publication:
|
||||
|
||||
hugo new publications/my-paper-name.md
|
||||
hugo new publication/my-paper-name.md
|
||||
|
||||
Then edit the default variables at the top of `publications/my-paper-name.md` to include the details of your publication. The `url_` variables (except `url_image`) are used to generate links associated with your publication, such as for viewing PDFs of papers. Here is an example:
|
||||
Then edit the default variables at the top of `content/publication/my-paper-name.md` to include the details of your publication. The `url_` variables (except `url_image`) are used to generate links associated with your publication, such as for viewing PDFs of papers. Here is an example:
|
||||
|
||||
```
|
||||
+++
|
||||
abstract = "An abstract..."
|
||||
authors = ["First author's name", "Second author's name"]
|
||||
date = "2013-07-01"
|
||||
math = false
|
||||
publication = "The publishing part of the citation goes here. You may use *Markdown* for italics etc."
|
||||
title = "A publication title, such as title of a paper"
|
||||
url_code = ""
|
||||
|
@ -75,14 +76,16 @@ url_dataset = ""
|
|||
url_image = ""
|
||||
url_pdf = "/pdf/my-paper-name.pdf"
|
||||
url_project = ""
|
||||
url_slides = ""
|
||||
url_video = ""
|
||||
+++
|
||||
|
||||
If you wish, further details on your publication can be written here in plain text using *Markdown*. This text will be displayed on the Publication Detail page.
|
||||
Further details on your publication can be written here using *Markdown* for formatting. This text will be displayed on the Publication Detail page.
|
||||
```
|
||||
|
||||
The `url_` links can either point to local or web content. Associated local publication content, such as PDFs, may be copied to a `/static/pdf/` folder and referenced like `url_pdf = "/pdf/my-paper-name.pdf"`.
|
||||
|
||||
You can also associate custom link buttons with the publication by adding the following block(s) within the variable section above, which is denoted by `+++`:
|
||||
You can also associate custom link buttons with the publication by adding the following block(s) within the variable preamble above, which is denoted by `+++`:
|
||||
|
||||
```
|
||||
[[url_custom]]
|
||||
|
@ -90,33 +93,48 @@ You can also associate custom link buttons with the publication by adding the fo
|
|||
url = "http://www.example.org"
|
||||
```
|
||||
|
||||
Note that the `url_image` variable is a placeholder that may be used if you wish to modify the publication list to show thumbnails either from images in your `/static/img/` folder (which is deployed as `http://your-URL.com/img/`), or URLs of web images.
|
||||
Note that the `url_image` variable is a placeholder that may be used if you wish to modify the publication list to show thumbnails either from images in your `static/img/` folder (which is deployed as `http://your-URL.com/img/`), or URLs of web images.
|
||||
|
||||
### Post a news article
|
||||
### Post an article
|
||||
|
||||
To create a blog/news article:
|
||||
|
||||
hugo new blog/my-article-name.md
|
||||
hugo new post/my-article-name.md
|
||||
|
||||
Then edit the newly created file `blog/my-article-name.md` with your full title and content.
|
||||
Then edit the newly created file `content/post/my-article-name.md` with your full title and content.
|
||||
|
||||
You may use Markdown to format the content. Furthermore, code highlighting is allowed in case your news articles are related to discussing programming or computer science. An example can be seen in `themes/hugo-academic/exampleSite/example-post.md`. Note that post tagging is not currently used, but is a placeholder for a future update.
|
||||
You may use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format the content. Furthermore, code highlighting and LaTeX math rendering are supported. To enable LaTeX math rendering for a page, you should include `math = true` in the preamble, as demonstrated in the included example site.
|
||||
|
||||
Images may be added to a post by placing them in your `static/img/` folder and referencing them in Markdown such as with ``.
|
||||
|
||||
### Create a project
|
||||
|
||||
To create a project:
|
||||
|
||||
hugo new projects/my-project-name.md
|
||||
hugo new project/my-project-name.md
|
||||
|
||||
Then edit the newly created file `projects/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.
|
||||
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.
|
||||
|
||||
### Add a section to home page
|
||||
|
||||
To add a new section to the home page:
|
||||
|
||||
hugo new home/my-section-name.md
|
||||
|
||||
Then edit the newly created file `content/home/my-section-name.md` with your section title and content. In the `+++` preamble, you should also increment the `section_id` to ensure it's unique amongst the other sections in `content/home` and you can adjust `weight` variable to change the order within the custom section of the home page.
|
||||
|
||||
You may also wish to add a navigation link 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
|
||||
|
||||
### Removing content
|
||||
|
||||
Generally, to remove content, simply delete the relevant file from your `content/blog`, `content/publications`, or `content/projects` folder.
|
||||
Generally, to remove content, simply delete the relevant file from your `content/post`, `content/publication`, `content/project`, or `content/home` folder.
|
||||
|
||||
Otherwise, to remove the Teaching section from the home page, simply delete the `content/home/teaching.md` file. Alternatively, you may re-purpose the section by editing the heading and contents within the file.
|
||||
|
||||
Once content is removed, you can rebuild and view the updated website with the `hugo` and `hugo server --watch` commands.
|
||||
Then you can re-build and view the updated website with the `hugo` and `hugo server --watch` commands, respectively.
|
||||
|
||||
## Upgrading
|
||||
|
||||
|
@ -126,4 +144,8 @@ Feel free to star the project on [Github](https://github.com/gcushen/hugo-academ
|
|||
|
||||
Please use the [issue tracker](https://github.com/gcushen/hugo-academic/issues) to let me know about any bugs or feature requests, or alternatively make a pull request.
|
||||
|
||||
Created by [George Cushen](http://www.cushen.me).
|
||||
## License
|
||||
|
||||
Copyright 2016 [George Cushen](http://www.cushen.me).
|
||||
|
||||
Released under the [MIT](https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md) license.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 102 KiB |
BIN
images/tn.png
BIN
images/tn.png
Binary file not shown.
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 60 KiB |
|
@ -10,3 +10,9 @@ min_version = 0.15
|
|||
[author]
|
||||
name = "George Cushen"
|
||||
homepage = "http://www.cushen.me"
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = ""
|
||||
homepage = ""
|
||||
repo = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue