How can I locally build a GitHub Pages site that has no gemfile?
Asked Answered
B

0

7

I have a GitHub Pages site that I generated by creating a repository and choosing a theme on GitHub. While the site is technically built using Jekyll, it has no gemfile, and the _config.yml is very concise:

theme: jekyll-theme-dinky
title: "<site name>"

In contrast, proper Jekyll sites created with jekyll new . have proper gemfile and gemfile.lock files, and a verbose _config.yml. Pardon my general ignorance with Jekyll and Ruby, but I assume these are necessary for Jekyll to build the site locally.

Running jekyll serve on a local clone of my site doesn't build the site properly. Yet GitHub's own pipeline can.

The question: Is there a way to locally build and preview my site without adding a gemfile/gemfile.lock and changing _config.yml? I.e. do exactly what GitHub's pipeline does, just on my computer.

Boldfaced answered 6/5, 2021 at 14:54 Comment(3)
I'm not sure if there is a way to build a site without the Gemfile. But, why would it matter if you added a Gemfile to the project? You wouldn't have to commit it if you didn't want it on the server. If you wanted to keep it locally but not upload it to your remote repo, you could add it to your .gitignore.Affecting
@BradWest I could, but then I don't how the exact configuration that GitHub uses, and it may result in subtle differences between what I generate locally VS what GitHub actually generates. I don't want to generate and push the HTML pages myself, btw. Had I considered that as an option, I would look for alternatives like Hugo.Boldfaced
GitHub Pages will build what you put in the Gemfile. So, in that way, they'll be no difference. Check out this: github.com/github/pages-gem and this: pages.github.com/versionsAffecting

© 2022 - 2024 — McMap. All rights reserved.