AOSC Wiki / Developer / Infrastructure / .
Also available in: 简体中文

Portal Website

Maintenance Notes for Portal Website

Basic Directory Structures§

Build the Pages Locally§

To generate pages, run If you want to design or modify the pages and see the modifications in realtime, you can run hugo server and follow the on-screen instructions.

To use this, you need Python 3 and after switching to the directory daemon/ run pip install -r requirements.txt in a venv. Then execute it: python3

Adding New Posts§

Run this:

hugo new -k posts content/news/posts/

Open the file content/news/posts/ in your favorite text editor and edit away.

Manually add new posts§

Simply add a new file with the file name in the content/news/posts directory.

For "front-matter" (the metadata at the top), here is an example which you may want to copy:

  - news
title: "title"
date: 2006-01-02
important: false

Note that the categories could be news and/or community.

Add New Personal Pages§

Run this if writing in Markdown format (note, in this case, inline HTML code will be removed from your page):

hugo new -k people content/people/<preferred_name>.md

Run this if writing in HTML format:

hugo new -k people content/people/<preferred_name>.html

Caveats for Hugo§

  1. The posts/personal pages cannot contain raw HTML code, the raw HTML code will be stripped away by Hugo's Markdown renderer as a security precaution. If you want to embed something, check out Hugo's builtin shortcode explainer.
  2. The posts/personal pages cannot contain templating syntax like {{ $something }}, they will be escaped automatically. If you want to use templating syntax, you probably need to use shortcodes, see the documentation above.

Publishing Your Changes§

Simply push your commits to master branch. The deployment of the website is automated, you can see the process here. If you don't have the permission to do so, you may open a new PR instead.