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
868cc51f
Commit
868cc51f
authored
Aug 05, 2021
by
吕祺
⛹🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tojson
parent
3077e63c
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
.gitlab-ci.yml
.gitlab-ci.yml
+1
-0
toJSON.js
utils/toJSON.js
+3
-2
No files found.
.gitlab-ci.yml
View file @
868cc51f
...
...
@@ -50,6 +50,7 @@ deploy:
-
yarn
# - sh utils/imageCompress.sh
-
npm run export
-
node utils/toJSON.js
-
rm -rf /home/gitlab-runner/deploy/cms/ronghui/out
-
echo "预览页面已清除"
-
cp -r out /home/gitlab-runner/deploy/cms/ronghui
...
...
utils/toJSON.js
View file @
868cc51f
...
...
@@ -10,11 +10,12 @@ const storeData = (data, path) => {
}
try
{
const
doc
=
yaml
.
loadAll
(
fs
.
readFileSync
(
'.
.
/content/frontPage.md'
,
'utf8'
));
const
doc
=
yaml
.
loadAll
(
fs
.
readFileSync
(
'./content/frontPage.md'
,
'utf8'
));
// console.log(doc[0]);
storeData
(
doc
[
0
],
'.
.
/out/frontpage.json'
)
storeData
(
doc
[
0
],
'./out/frontpage.json'
)
}
catch
(
e
)
{
console
.
log
(
e
);
throw
(
e
)
}
// console.log(yaml.loadAll(`
// ---
...
...
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