It is warmly welcomed if you have interest to contribute to xlab-website and help make it even better than it is today! The following is a set of guidelines for contributing to xlab-website.
Remember that always use dash -
instead of spaces, E.g. use leo-fang
instead of leo fang
.
To create an additional user automatically or manually,
hugo new --kind authors authors/firstname-lastname
Directly create a folder content/authors/firstname-lastname
and create a file content/authors/firstname-lastname/index.md
.
Edit the newly created file at content/authors/firstname-lastname/index.md
.
Once you have edited the parameters in the front matter (top of the file), you can add the user’s full biography in the body (below the final ---
) using Markdown formatting.
You can also upload a square photo for the user to the new authors/firstname-lastname/
folder and name it avatar
(in JPEG or PNG format). If you didn’t replace the default avatar image in the process, you may wish to delete it from the folder.
To create a project automatically or manually,
hugo new --kind project project/my-project-name
Directly create a folder content/project/my-project-name
and a file content/project/my-project-name/index.md
.
Edit the newly created file at content/project/my-project-name/index.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.
To create a blog/news article automatically or manually,
hugo new --kind post post/my-article-name
Directly create a folder content/post/my-article-name
and create a file content/post/my-article-name/index.md
.
Edit the newly created file at content/post/my-article-name/index.md
.
Hugo will automatically generate summaries of posts that appear on the homepage. If you are dissatisfied with an automated summary, you can either limit the summary length by appropriately placing <!--more-->
in the article body, or completely override the automated summary by adding a summary
parameter to the +++
preamble such that:
summary: "Summary of my post."
Front matter allows page-specific metadata and functionality to be included at the top of a Markdown file.
For editing your content locally on your computer, we recommend Visual Studio Code or Typora.
-
title: the title of your page.
-
summary: a one-sentence summary of the content on your page. The summary can be shown on the homepage and can also benefit your search engine ranking.
-
date: the RFC 3339 date that the page was published. A future date will schedule the page to be published in the future. If you use the
hugo new ...
commands described on this page, the date will be filled automatically when you create a page. Also see lastmod and publishDate. -
authors: display the authors of the page and link to their user profiles if they exist. To link to a user profile, create a user based on the admin template and reference their username (the name of a user in your
authors
folder) in theauthors
field, e.g.authors: ["admin"]
. -
tags: tagging your content helps users to discover similar content on your site. Tags can improve search relevancy and are displayed after the page content and also in the Tag Cloud widget. E.g.
tags: ["Electronics", "Diodes"]
.
-
subtitle: an optional subtitle that will be displayed under the title.
-
featured: by setting
featured: true
, a page can be displayed in the Featured widget. This is useful for sticky, announcement blog posts or selected publications etc. -
categories: categorizing your content helps users to discover similar content on your site. Categories can improve search relevancy and display at the top of a page alongside a page’s metadata. E.g.
categories: ["Art"]
. -
lastmod: the RFC 3339 date that the page was last modified. If using Git, enable
enableGitInfo
inconfig.toml
to have the page modification date automatically updated, rather than manually specifyinglastmod
. -
publishDate: the RFC 3339 date that the page was published. You only need to specify this option if you wish to set date in the future but publish the page now, as is the case for publishing a journal article that is to appear in a journal etc.
-
draft: by setting
draft: true
, only you will see your page when you preview your site locally on your computer.
Rich content can be written in Academic using Markdown, LaTeX math, and Shortcodes. For more details please refer to Docs of Academic.