Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Pagesでの静的ファイルのホスティングの確認 #10

Closed
ftnext opened this issue Feb 3, 2021 · 3 comments
Closed

Comments

@ftnext
Copy link
Owner

ftnext commented Feb 3, 2021

解決したい問題

  • _static/css 下のCSSが当たらない
  • _images 下の画像が見つからない
@ftnext
Copy link
Owner Author

ftnext commented Feb 3, 2021

解決策

GitHub Pagesで公開しているディレクトリ(このリポジトリではdocs)の下に .nojekyll という空ファイルを置く

ref: https://stackoverflow.com/a/39691475
ref2: https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/

.nojekyll を置かずにGitHub Pagesをデプロイしたところ、docsの下の_static_imagesが404となった。

@ftnext ftnext closed this as completed Feb 3, 2021
@ftnext
Copy link
Owner Author

ftnext commented Feb 3, 2021

まとまったQiita
https://qiita.com/tutuz/items/88a32d94d700b33dc3ea#github-pages-%E3%81%A8%E3%81%AE%E9%80%A3%E6%90%BA

https://d-tsuji.github.io/sphinx-sample/ の裏にある https://github.com/d-tsuji/sphinx-sample/tree/master/docs はディレクトリ配置の参考になる

sphinx.ext.githubpages を試したい(現状buildディレクトリとdocsディレクトリが食い違っているのが問題か)
https://www.sphinx-doc.org/ja/master/usage/extensions/githubpages.html

@ftnext
Copy link
Owner Author

ftnext commented Feb 3, 2021

make revealjs した後のリリース手順

後々自動化するためのメモ

HTMLの配置

$ mkdir docs/rakus_Feb_oss
$ cp build/revealjs/rakus_Feb_oss/not_only_code_but_various_contributions.html docs/rakus_Feb_oss/

HTMLの中を置換

_static/revealjs4 -> reveal.js

buildの下とdocsの下とでreveal.jsのあるディレクトリが違うため

画像の配置

_images の下に移動

$ mkdir docs/_images
$ cp build/revealjs/_images/202102django_girls_tutorial_ja_top.png docs/_images/

静的ファイルの配置

_static/css に移動

$ mkdir -p docs/_static/css
$ cp build/revealjs/_static/css/common.css docs/_static/css/

この後に以下のコマンドを実行
#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant