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

Add .nojekyll #67

Closed
wants to merge 1 commit into from
Closed

Add .nojekyll #67

wants to merge 1 commit into from

Conversation

victorbnl
Copy link

@victorbnl victorbnl commented Feb 17, 2023

This adds a .nojekyll file when pushing the built site in order for git not to build it on jekyll, thus gaining performance.

Closes #66

@shalzz
Copy link
Owner

shalzz commented Feb 20, 2023

Can you please share any documentation that describes the use of .nojekyll and any associated performance benefits?

@victorbnl
Copy link
Author

Sure! Here is the blog post from GitHub explaining it: https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/

About the performance benefits I don't have any resources, it just feels logical that just copying files is faster than processing them with Jekyll, but if it's not enough to convince you I can test it

@shalzz
Copy link
Owner

shalzz commented Feb 20, 2023

Hi, github pages only builds a site when it sees the repo containing at least a gemfile on top of various other heuristics. I don't see any reason to worry about github trying to build with Jekyll when there's only static html files pushed to the gh-pages branch/folder.

@shalzz shalzz closed this Feb 20, 2023
@muzimuzhi
Copy link

muzimuzhi commented May 25, 2023

Hi, github pages only builds a site when it sees the repo containing at least a gemfile on top of various other heuristics.

It doesn't seem so, see each run of the automatic workflow "pages-build-deployment" in my fork of islandoftex/arara.

In each run, the "Build" job always builds with Jekyll, see for example job 9130790528

Quoting docs for GitHub Pages,

Your GitHub Pages site will always be deployed with a GitHub Actions workflow run, even if you've configured your GitHub Pages site to be built using a different CI tool. Most external CI workflows "deploy" to GitHub Pages by committing the build output to the gh-pages branch of the repository, and typically include a .nojekyll file. When this happens, the GitHub Actions workflow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to GitHub Pages servers.

Hence I think a .nojekyll file is needed and does help.

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

Successfully merging this pull request may close these issues.

Add .nojekyll
3 participants