Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
C
cmscenter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吕祺
cmscenter
Commits
3077e63c
Commit
3077e63c
authored
Aug 05, 2021
by
吕祺
⛹🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tojson
parent
25386256
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
2 deletions
+84
-2
.gitlab-ci.yml
.gitlab-ci.yml
+3
-2
js-yaml.js
utils/js-yaml.js
+2
-0
toJSON.js
utils/toJSON.js
+79
-0
No files found.
.gitlab-ci.yml
View file @
3077e63c
...
...
@@ -20,9 +20,10 @@ compile_articles:
-
node utils/articleAggregate.js
-
sh utils/commit.sh
-
npm run export
-
node utils/toJSON.js
-
rm -r /home/gitlab-runner/deploy/cms/ronghui/out
-
cp -r out /home/gitlab-runner/deploy/cms/ronghui
-
cp -r content /home/gitlab-runner/deploy/official/out
#
- cp -r content /home/gitlab-runner/deploy/official/out
-
echo "cms https://cmsadmin.gaorongvc.cn/ronghui/admin"
...
...
@@ -52,7 +53,7 @@ deploy:
-
rm -rf /home/gitlab-runner/deploy/cms/ronghui/out
-
echo "预览页面已清除"
-
cp -r out /home/gitlab-runner/deploy/cms/ronghui
-
cp -r content out
#
- cp -r content out
-
/home/gitlab-runner/sh/ossutil64 cp -f out oss://touhou-cms/ -r
...
...
utils/js-yaml.js
0 → 100644
View file @
3077e63c
This diff is collapsed.
Click to expand it.
utils/toJSON.js
0 → 100644
View file @
3077e63c
const
yaml
=
require
(
'./js-yaml.js'
)
const
fs
=
require
(
'fs'
);
const
storeData
=
(
data
,
path
)
=>
{
try
{
fs
.
writeFileSync
(
path
,
JSON
.
stringify
(
data
))
}
catch
(
err
)
{
console
.
error
(
err
)
}
}
try
{
const
doc
=
yaml
.
loadAll
(
fs
.
readFileSync
(
'../content/frontPage.md'
,
'utf8'
));
// console.log(doc[0]);
storeData
(
doc
[
0
],
'../out/frontpage.json'
)
}
catch
(
e
)
{
console
.
log
(
e
);
}
// console.log(yaml.loadAll(`
// ---
// MetaDescription: test
// articles:
// - title: 关于冒用高榕资本名义的严正声明
// - title: 关于冒用高榕资本名义的严正声明2
// rollimage1: /static/img/屏幕截图-2021-08-05-143335.png
// rollimage2: /static/img/屏幕截图-2021-08-05-143335.png
// rollimage3: /static/img/abstract_xinxingji_21-06-07.jpg
// bigevent:
// - title: 叮咚买菜成功登陆纽交所
// tag: 本周大事件
// btnText: 本周重磅
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpName: 叮咚买菜成功登陆纽交所
// jumpUrl: ""
// - title: "创业者沟通实战课 — 脱不花 得到App CEO 7月15日·北京 7月15日,北京 "
// tag: "榕汇活动预告 "
// btnText: 即刻报名
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpName: "创业者沟通实战课 — 脱不花 得到App CEO 7月15日·北京 7月15日,北京 "
// jumpUrl: ""
// - title: To B企业构建高质量增长体系 7月15日,北京
// tag: To B增长营
// btnText: 查看全部
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpName: To B企业构建高质量增长体系 7月15日,北京
// jumpUrl: ""
// ronghui:
// - title: "2021全球To B领域12个新趋势与12个新增长模式 "
// subTitle: 刘新华 高榕资本合伙人、原快手首席增长官
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpName: "2021全球To B领域12个新趋势与12个新增长模式 "
// jumpUrl: ""
// - title: 真高管团队打造
// subTitle: 房晟陶 首席组织官创始人、原龙湖集团CHO
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpName: t
// jumpUrl: ""
// pr:
// - title: 水滴IPO传播
// subTitle: "独家对话沈鹏 "
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpUrl: ""
// jumpName: t
// - title: "Nuro C轮融资 "
// subTitle: "核心媒体落地 "
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpUrl: ""
// jumpName: t
// - title: "凌迪科技采访 "
// subTitle: "定制短视频 "
// cover: /static/img/abstract_xinxingji_21-06-07.jpg
// jumpUrl: ""
// jumpName: t
// ---
// `)
// )
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment