This repository is for the website for the sciwork portal. Check-ins to the repository will be automatically deployed to the website by Netlify.
The website is built by using pelican. The flow for contribution is:
- Clone the repository
- Run a local devserver
- Edit the content
- File a pull request (PR) against
developbranch - Resolve discussions in the PR review
- PR is merged, done
Note
Do NOT file PR against the master branch.
In the working copy root, run the following command for the local devserver:
env SITEURL=http://localhost:8000 make devserver [PORT=8000]The master branch is deployed to the official website https://sciwork.dev
and https://swportal.netlify.app.
The develop branch is deployed to the under development
https://develop--swportal.netlify.app.
Other branches are deployed to https://{branch}--swportal.netlify.app. Replace
/ in the branch name with -.
Pull requests are deployed to
https://deploy-preview-{id}--swportal.netlify.app. {id} is the PR ID.
To add contents or website features, create a branch named like
feature/your-addition.
To add a new blog entry, the branch name should be
feature/blog/entry-name.
To add a new evnet entry, the branch name should be
feature/event/entry-name.
If you want to fix bugs or typographical errors, create a branch named like
bugfix/your-fix.
Pelican supports writing content in reStructuredText format (with a file ending
in .rst) or Markdown syntax (with a file ending in .md, .markdown,
.mkd, or .mdown).
To add a new Scisprint event, save the pages into
content/pages/sprint/{date:%Y} directory,
and the URL should be sprint/{date:%Y}/{slug}.
In order to generate sitemap.xml smoothly, some modifications are necessary:
- Make sure that env variable
SITEURLhas existed. - Make sure that each .rst has
:url:and:save_as:parameters. - each time you run
pelican contentormake html,sitemap.xmlwill be generated automatically.