RayeRen / acad-homepage.github.io

AcadHomepage: A Modern and Responsive Academic Personal Homepage
MIT License
1.06k stars 1.95k forks source link

添加了docker编译环境,希望作者加进去。 #27

Closed MaxwelsDonc closed 1 month ago

MaxwelsDonc commented 1 year ago

我之前因为环境问题,一直编译不通过,所以做了个docker镜像,你可以考虑加进去。

  1. 下载docker,具体可以参考官网
  2. 在你的目标文件夹的终端运行代码 docker run -p 4000:4000 -v $(pwd):/site maxwelsdonc/acadhomepage,会自动下载镜像maxwelsdonc/acadhomepage
  3. 修改run_server.sh文件内容为docker run --rm -p 4000:4000 -v $(pwd):/site maxwelsdonc/acadhomepage
  4. 在你的目标文件夹的终端运行代码bash run_server.sh然后可以在http://localhost:4000中查看相应的网页。
  5. 可以直接在源文件中进行修改,保存后刷新网页自动同步。
  6. 退出后会自动删掉容器和相应的文件,只保留镜像就可以了。
BowenBryanWang commented 8 months ago

Configuration file: /site/_config.yml Source: /site Destination: /site/_site Incremental build: disabled. Enable with --incremental Generating... Jekyll Feed: Generating feed for posts GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data. done in 6.058 seconds. jekyll 3.9.0 | Error: no implicit conversion of Hash into Integer /usr/local/bundle/gems/pathutil-0.16.2/lib/pathutil.rb:502:inread': no implicit conversion of Hash into Integer (TypeError) from /usr/local/bundle/gems/pathutil-0.16.2/lib/pathutil.rb:502:in read' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:75:inproc_version' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:40:in bash_on_windows?' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:77:inwatch' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:43:in process' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:inblock in start' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in each'

请我创建docker时报错是为什么呀

MaxwelsDonc commented 1 month ago

Configuration file: /site/_config.yml Source: /site Destination: /site/_site Incremental build: disabled. Enable with --incremental Generating... Jekyll Feed: Generating feed for posts GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data. done in 6.058 seconds. jekyll 3.9.0 | Error: no implicit conversion of Hash into Integer /usr/local/bundle/gems/pathutil-0.16.2/lib/pathutil.rb:502:inread': no implicit conversion of Hash into Integer (TypeError) from /usr/local/bundle/gems/pathutil-0.16.2/lib/pathutil.rb:502:in read' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:75:inproc_version' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:40:in bash_on_windows?' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:77:inwatch' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:43:in process' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:inblock in start' from /usr/local/bundle/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in each'

请我创建docker时报错是为什么呀

我忘了,很早之前整的了,我docker账号都没了