In NexMotion API repo, some source file start with capital char (such as NexMotion.h
).
Doxygen will generate Corresponding html file with underscore (such as _nex_motion_8h.html
).
By default, github pages attempt to use Jekyll handles file name with underscores differently, so cause some unsual content policy security error To prevent it, create a file called .nojekyll in the root of your repository / site folder.
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
# to NO, which it is by default. So creating the file just in case.
echo "" > .nojekyll
when deploy with trvisCI by yaml
script:
- mkdir build && cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release
- make
- make install
# create a .nojekyll file to allow filenames starting with an underscore to be seen on the gh-pages site.
- cd ..
- echo "" > ./docs/html/.nojekyll
deploy:
provider: pages
skip_cleanup: true
local_dir: docs/html
github_token: $GH_REPO_TOKEN
on:
branch: master
Reference:
https://gist.github.com/vidavidorra/548ffbcdae99d752da02
https://ellismichael.com/blog/2015/06/12/using-travis-ci-with-github-pages/
https://okitavera.me/article/github-pages-static-site-generator-and-travisci/
Others similar issue with CSP but not related to doxygen (wrong direction lead by same error message) https://stackoverflow.com/questions/45366744/refused-to-load-the-font-datafont-woff-it-violates-the-following-content/50504870