-
Notifications
You must be signed in to change notification settings - Fork 3.1k
How can I view / develop my website locally? #1991
-
Hi! 👋
How would I go on to develop my website locally? Constantly pushing a minor change and letting the GitHub pages action build the website seems suboptimal.
When I want to host locally by running bundle exec jekyll liveserve
the page is not found and when I refresh it I get redirected to the website hosted by GitHub pages.
Do I have to change something in the _config.yaml?
Once I open localhost I also get this error message:
[2023年03月01日 04:15:01] ERROR NoMethodError: undefined method `key?' for nil:NilClass\n\n return unless @mime_types_charset.key?(typ)\n ^^^^^
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve/servlet.rb:191:in `conditionally_inject_charset'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/jekyll-3.9.3/lib/jekyll/commands/serve/servlet.rb:176:in `do_GET'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/hawkins-2.0.5/lib/hawkins/servlet.rb:134:in `do_GET'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/webrick-1.8.1/lib/webrick/httpservlet/abstract.rb:105:in `service'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/webrick-1.8.1/lib/webrick/httpservlet/filehandler.rb:242:in `service'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/Users/borismeinardus/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
Replies: 5 comments 2 replies
-
Try with bundle exec jekyll serve
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 12 -
❤️ 1
-
Hi,
I was trying to get my website locally (in VC code) and after more than an hour I've succeeded :)
I've written following readme, maybe it will help :
`to run this website localy:
0) instal ruby on rails and jekyll: https://jekyllrb.com/docs/installation/macos/
-
change the GemFile as follow:
comment the line:
#gem "github-pages", group: :jekyll_plugins
uncomment following lines:
gem "jekyll"
gem "jekyll-paginate"
gem "jekyll-gist"
gem "jekyll-redirect-from"
gem "kramdown-parser-gfm"
gem "webrick" -
bundle install
-
bundle exec jekyll serve
-
open http://127.0.0.1:4000/ in your browser`
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 14
-
Appreciate you! @PatrykPrezyna
Beta Was this translation helpful? Give feedback.
All reactions
-
liveserve is not possible anymore?
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, I was trying to get my website locally (in VC code) and after more than an hour I've succeeded :) I've written following readme, maybe it will help :
`to run this website localy: 0) instal ruby on rails and jekyll: https://jekyllrb.com/docs/installation/macos/
1. change the GemFile as follow: comment the line: #gem "github-pages", group: :jekyll_plugins uncomment following lines: gem "jekyll" gem "jekyll-paginate" gem "jekyll-gist" gem "jekyll-redirect-from" gem "kramdown-parser-gfm" gem "webrick" 2. bundle install 3. bundle exec jekyll serve 4. open http://127.0.0.1:4000/ in your browser`
Thanks! this helped
Beta Was this translation helpful? Give feedback.
All reactions
-
I made changes locally, and the website is visible locally as expected. I used "bundle exec jekyll serve" to open it locally. However, it failed to build on GitHub. The error message lists all files in_publicaiton, _data, and other folders.
Error: Logging at level: debug Configuration file: /github/workspace/./_config.yml GitHub Pages: github-pages v232 GitHub Pages: jekyll v3.10.0 Theme: jekyll-theme-primer Theme source: .........................
Beta Was this translation helpful? Give feedback.
All reactions
-
It might be better to create a new thread for this, also more of the log would be needed for troubleshooting as well.
Beta Was this translation helpful? Give feedback.