From d6af0575e17cec794b7c50033fcccba48e7b576b Mon Sep 17 00:00:00 2001 From: MrTT Date: Sun, 12 Jan 2020 23:33:38 +0800 Subject: [PATCH 1/3] Add ... --- flamegraph.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 flamegraph.sh diff --git a/flamegraph.sh b/flamegraph.sh new file mode 100644 index 0000000000..0c42f4f7fd --- /dev/null +++ b/flamegraph.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +ls -al +cd .. +ls -al +hexo init temp From 6984cdddb0528a4d4ba9065ed44da8cf5e020bf0 Mon Sep 17 00:00:00 2001 From: MrTT Date: Sun, 12 Jan 2020 23:43:20 +0800 Subject: [PATCH 2/3] ... --- flamegraph.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/flamegraph.sh b/flamegraph.sh index 0c42f4f7fd..9968c3fc3f 100644 --- a/flamegraph.sh +++ b/flamegraph.sh @@ -1,6 +1,12 @@ #!/bin/sh -ls -al +pwd cd .. -ls -al -hexo init temp +npm install -g hexo +npm install -g 0x +mv repo next +hexo init repo +cd repo +mv ../next themes/next +hexo config theme next +0x --output-dir 'dist' -- node ./node_modules/.bin/hexo g From 9bebf7acd0f69f98ef8be56b890da828dc2df02e Mon Sep 17 00:00:00 2001 From: MrTT Date: Sun, 12 Jan 2020 23:51:15 +0800 Subject: [PATCH 3/3] Add posts --- flamegraph.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flamegraph.sh b/flamegraph.sh index 9968c3fc3f..7d67543a3f 100644 --- a/flamegraph.sh +++ b/flamegraph.sh @@ -1,6 +1,7 @@ #!/bin/sh -pwd +# Create hexo project +echo "- Create hexo project" cd .. npm install -g hexo npm install -g 0x @@ -9,4 +10,12 @@ hexo init repo cd repo mv ../next themes/next hexo config theme next + +# Clone data +echo "- Import 300 posts" +git clone https://github.com/SukkaLab/hexo-many-posts.git source/_posts/hexo-many-posts --depth=1 --quiet + +# Exec 0x +echo "- Generating flamegraph..." 0x --output-dir 'dist' -- node ./node_modules/.bin/hexo g +mv dist/flamegraph.html dist/index.html