zanderzhao / gitbook-action Goto Github PK
View Code? Open in Web Editor NEWGithub Action For Gitbook
Home Page: https://ZanderZhao.github.io/gitbook-action/
Github Action For Gitbook
Home Page: https://ZanderZhao.github.io/gitbook-action/
下面是github项目的配置
gh-pages
图片文件在.gitbook/asserts文件夹中,在本地md 工具中可以正常显示。
I am using the following settings:
publish_dir: draft
publish_remove_last_build: true
With this setting, the directory ./local_publish/draft is created with mkdir, then ./local_publish/draft is
deleted with git rm command. This then generates an error in the cp command because
./local_publish/draft is no longer present. I see the following in the build log:
cp: target 'local_publish/draft' is not a directory
Does the order of the mkdir and git rm commands need to be reversed in the publish section of entrypoint.sh?
######################### For publish #########################################
# if branch is new, need pubilsh_dir(if not /)
if [ ! -d "./local_publish/${INPUT_PUBLISH_DIR}" ] ; then
mkdir ./local_publish/${INPUT_PUBLISH_DIR}
fi
# need or not gitbook build history
if [ ${INPUT_PUBLISH_REMOVE_LAST_BUILD} = "true" ] ; then
cd local_publish
git rm -rf --ignore-unmatch ./${INPUT_PUBLISH_DIR}/*
# git rm -rf --ignore-unmatch ./${INPUT_PUBLISH_DIR}/.*
cd ..
fi
# move build file to each publish dir
cp -rfp local_source/_book/. local_publish/${INPUT_PUBLISH_DIR}
您好,首先特别感谢您开发本Action工具,我使用后感觉非常好用,但是有一个小问题的,git push --force
将_book
中的所有文件强制推送到gh-pages
分支后,导致所有页面页脚处显示的修改时间都会变化,而不是只修改特定的网页,请问如何解决?
不好意思,我是小白,提的问题比较小儿科,望能帮忙解决。
例如
$\sqrt{3x-1}+(1+x)^2$
或者
$$
\begin{vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{vmatrix}
$$
问题:在生成 PDF 或者 mobi 等电子书的时候,在生成的时候将 svg 转成 png 图片的时候有问题
error: error while generating page "README.md":
Error: Error converting /tmp/tmp-281LPVxSm5Bv6U1/842cb21f.svg into /tmp/tmp-281LPVxSm5Bv6U1/302430b8.png
网上搜了一下需要安装指定 svgexport
版本,但是 Gitbook 本身的配置文件中是没有无关的版本依赖的,需要在生成之前执行 npm 命令安装
npm install svgexport -g
希望能够提供这个功能,类似于现在已有的 font_install
字段
Even when I forked this repository and ran the action, I got the following error messages and the build failed:
info: installing plugin "sitemap-general"
info: install plugin "sitemap-general" (git+https://github.com/plugins-zander/gitbook-plugin-sitemap-general.git) from NPM with version git+https://github.com/plugins-zander/gitbook-plugin-sitemap-general.git
/github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/aproba/index.js:25
if (args[ii] == null) throw missingRequiredArg(ii)
^
Error: Missing required argument #1
at andLogAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:31:3)
at fetchPackageMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:51:22)
at resolveWithNewModule (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:490:12)
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:491:7
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:37:12
at addRequestedAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:67:5)
at returnAndAddMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:121:7)
at pickVersionFromRegistryDocument (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:138:20)
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50 {
code: 'EMISSINGARG'
}
+ gitbook build --gitbook=
info: 11 plugins are installed
Error: Couldn't locate plugins "sitemap-general, gtag, chapter-fold, copy-code-button", Run 'gitbook install' to install plugins from registry.
+ [ 1 -eq 0 ]
+ print_error 3105: gitbook build failed, please check is there something wrong with your book.json
+ echo \033[31m ERROR 3105: gitbook build failed, please check is there something wrong with your book.json \033[0m \a \n
ERROR 3105: gitbook build failed, please check is there something wrong with your book.json �
+ echo \033[32m Find Detail From: https://zanderzhao.github.io/gitbook-action/error \033[0m
+ exit 1
Find Detail From: https://zanderzhao.github.io/gitbook-action/error
It doesn't matter what the configuration or plugins are, with another repository I got the following error still:
info: install plugin "sitemap" (*) from NPM with version 1.2.0
/github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/aproba/index.js:25
if (args[ii] == null) throw missingRequiredArg(ii)
^
Error: Missing required argument #1
at andLogAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:31:3)
at fetchPackageMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:51:22)
at resolveWithNewModule (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:490:12)
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/install/deps.js:491:7
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:37:12
at addRequestedAndFinish (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:67:5)
at returnAndAddMetadata (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:121:7)
at pickVersionFromRegistryDocument (/github/home/.gitbook/versions/3.2.3/node_modules/npm/lib/fetch-package-metadata.js:138:20)
at /github/home/.gitbook/versions/3.2.3/node_modules/npm/node_modules/iferr/index.js:13:50 {
code: 'EMISSINGARG'
}
+ gitbook build --gitbook=
info: 7 plugins are installed
info: 10 explicitly listed
Error: Couldn't locate plugins "sitemap, alerts, edit-link, codepen", Run 'gitbook install' to install plugins from registry.
+ [ 1 -eq 0 ]
Find Detail From: https://zanderzhao.github.io/gitbook-action/error
+ print_error 3105:gitbook built fail,please check is there something wrong with your book.json or others
+ echo \033[31m ERROR 3105:gitbook built fail,please check is there something wrong with your book.json or others \033[0m \a \n
ERROR 3105:gitbook built fail,please check is there something wrong with your book.json or others �
+ echo \033[32m Find Detail From: https://zanderzhao.github.io/gitbook-action/error \033[0m
+ exit 1
I am having problems getting this action to work and I am stuck trying to figure out what am I doing wrong.
I have the action working on projects like this but on this one always says ...
Your site is having problems building: Page build failed. For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#troubleshooting-build-errors.
The output of the job scheduled by the action does not throw any error. Also, I am able to gitbook serve and build the book locally. I have added also a .nojekyll file, but nothing works.
Thanks for sharing your knowledge and your work.
RT,目前是拷贝所有文件到gh-pages分支
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.