Blog is a document which contain documents for Momentum libraries. It supports localization and help to generate static website from markdown files.
You can visit the website here.
Momentum repostories such as mframe follow the following steps to update its web pages under blog website.
-
Perpare github action copy to copy doucment from other repostories to
doc/_posts
under blog repostory. Copy files to/doc/_posts/en_us/$projectName$
at last. -
Update documents in mframe
-
The github action deploy in blog site will use hexo to generate and deploy the website.
Momentum blog will set up each document's catrgories according to it's path.
_posts/en_us/mframe/fundamentals/event.md
en_us
mframe
fundamentals
You can find the format according to Hexo front format.
In order to hide the yml header in github website, you can use the remark code <!-- -->
to warp the yml header.
<!--
---
date: 2020/3/1 10:00:00
---
-->
Because github website does not support some tags such as iframe. You can warp the code with <!--@ @-->
to hide iframe in github website and show it in blog website.
<!--@<iframe src="https://momentum.design"></iframe>@-->
<!--@Hidden String@-->
Check the language supports here
You should copy documents in different languages to its language folder under doc/_posts
.
-
doc/_posts/en_us/your_project_name
English Documents -
doc/_posts/zh_cn/your_project_name
中文文档
You can clone Momentum Motion from github.
-
Install packages
sudo yarn
-
In
_config.yml
, changeurl: https://momentum-design.github.io/blog
tourl: http://localhost:4000/blog
-
Update code in
themes/momentum
-
run website
sudo hexo clean && hexo g && hexo s
© 2019-2020 Cisco and/or its affiliates. All Rights Reserved.