Website for SymbioticLab.
Built using Hexo.
The news entry on the front page are simply posts with the special News
category. New posts can be created
by running
node_modules/.bin/hexo new news "News Title"
You can start a server locally.
npm start
It will automatically pick up most modifications to posts. So a simple refresh will show the latest content.
When it's not picking up your modifications, do a clean build:
npm run clean && npm start
Source code is in the develop
branch. Commits to this branch will be automatically built and pushed to the master
branch, which will then be served at https://SymbioticLab.github.io.
The site is based on hexo-theme-next
, with the following tweaks:
custom/*.styl
. They are read by the theme and merged with theme's own styling.hexo-next-publist
. This powers the publication list in publication/index.md
.hexo-extend-theme
. The templates custom/layouts/*.njk
can be used by setting the layout name in the front matter.scripts/front-page-generator.js
to generate multiple routes which are then
rendered using a custom page layout custom/front.njk
. The generator also reads in source/_front.md
for contents before the news section.scripts/skip-empty.js
._scripts/index.njk
with our own version.
Ideally, we only want to replace _scripts/pjax.njk
, but due to limitations in hexo-extend-theme
, that's not possible.
Because pjax.njk
is pulled in by the include
tag, rather than the partial
helper.Page styles can be modified in custom/styles.styl
and custom/variables.styl
. More is possible and the theme-next
documentation has more details.
This is a standalone plugin hexo-next-publist
. The plugin provides a publist
tag which can be used as normal
in the markdown.
Tweaks can be made in its own repo. @Aetf will maintain the plugin.
hexo-extend-theme
makes it possible to develop or override theme's layout templates.
Layout templates in custom/layouts/*.njk
will have higher priority than theme's builtin ones in node_modules/hexo-theme-next/layouts/*
.
By default, a post (source/_posts/*.md
) uses post.njk
and other markdowns uses page.njk
.
To create a new page with custom layout, follow the steps below:
custom/layouts/my-custom.njk
source
and set layout: my-custom
in front matter
---
title: A new page
layout: my-custom
date: 2020-01-01
---
This is my new page!