github page doesn't exist (the simple jekyll configuration) - jekyll

I have the simplest (default jekyll) page on github
https://github.com/pejot/pejot.github.io
When I run locally
bundle exec jekyll serve
it works fine.
but on the github domain
pejot.github.io
it says: "There isn't a GitHub Page here."
what can be a problem that it works locally but not on github? Please take into account that page is basically empty. Is the default one generated by jekyll.

I get it!
github takes gh-pages branch for project page and master for the user one.

Related

jekyll on github pages ignores custom layout

I'm trying to clone the repo https://github.com/TowerofHanoi/towerofhanoi.github.io on my GitHub, based on the website https://toh.necst.it and publish it on a new GitHub pages instance. I'm doing this to check that a new article is well formatted for publication.
I'm having trouble generating the website on GitHub pages, the site is somehow bad: https://mencucci.github.io/towerofhanoi.github.io/ (my repo: https://github.com/Mencucci/towerofhanoi.github.io).
Locally on my Ubuntu machine, I can get the site to render properly with the following commands:
bundle init
bundle add jekyll
rm -rf \_site && bundle exec jekyll serve --verbose
I couldn't get the remote to build properly.
I tried:
adding a valid theme (no changes)
using a custom build action (no changes)
I noticed a difference in the logs: local, and github. The local log references the /_layout directory, but the remote one does not. Maybe it doesn't "see" the theme?
Thank you for your time
Figured it out, my main issue was that I was running the site using the default url, which hosts the site at <username>.github.io/<repo_name>. Some hard coded elements assumed that the site be hosted at domain root instead. I solved my issue by using a custom domain, which mapped the to the base domain (empty path).

MkDocs site not getting deployed correctly to github pages

I am using Deploy MkDocs action to deploy my site to github pages. After pushing my changes to my master branch the action successfully runs.
However, when I visit my project page link then my site seems to be broken. Any pointers would be of great help.
My repo structure is the following-->
The document contents are inside the "docs" directory.
When I tried to visit the site using my pages link, I can see something like this(I have checked my site locally and it renders properly on my local machine) -->
Add an index.md to the src folder e.g. When build this will produce needed index.html page. Also try to build with: mkdocs build --clean.

How can I fix 404 error importing css on GitHub Pages?

I currently have the following Git Repository:
https://github.com/SebastianGode/ansible-collection-cloud/tree/gh-pages
And the GitHub Page link:
https://sebastiangode.github.io/ansible-collection-cloud/
The problem is that GitHub Pages will only solve the index.html and will throw an 404 for all required css and image stuff:
As the documentation is getting automatically generated by a travis-ci pipeline it's probably impossible to change paths, but as it works when hosted it locally it also should work on GitHub pages.
Is there any solution to this problem?
I fixed it.
GitHub has Jekyll running behind it which will mess up special paths (here the underscore paths). You can disable jekyll by just creating a .nojekyll file in the root directory of the branch. If you use travis-CI for something like that and run a tox script just call the command touch {toxinidir}/.nojekyll
This will result in a working website for me.

deploy a Jekyll site with the use of a

This is the first time that I am going to use Jekyll to build a static site. I would like to use a dozen plugins that are not white listed for deploying on Github. My question is : is it possible to deploy a such site with a dozen plugins (not white listed) on github ?
Browsing on internet, I found the following assertions :
1) We can't run user plugins on GitHub Pages due to security restrictions. That' what the documentation says
2) You are free to generate your site locally and push the resulting HTML to a Git repo, however : what does that means ? First when you generate the site locally, it ends with a group of HTML files and that group of html files, are they enough to run the site autonomously (for example must you include the css files in html pages ) ? Furthermore when you push the resulting HTML to a Git repo, is it enough to deploy it on a production environment (on GITHUB for example) ? and how you do that ?
3) on this link (https://help.github.com/articles/using-jekyll-plugins-with-github-pages/) I found the following explaination : Adding Jekyll plugins to a GitHub Pages site
You can further customize your GitHub Pages site by adding Jekyll plugins. (do they talk about all plugins ?)
GitHub Pages officially supports the Jekyll plugins found in the GitHub Pages gem. For the exact versions of the Jekyll plugins that GitHub Pages supports, see this list of GitHub Pages dependencies. Other plugins are not supported, so the only way to incorporate them in your site is to generate your site locally and then push your site's static files to your GitHub Pages site.
So as they say, it is possible , generating your site locally and then pushing your site's static files to your GitHub Pages site. Is there a detailled procedure example somewhere ?
Thanks in advance for your answers
To be able to use Jekyll with any plugins and host in Github pages you have two options
first alternative
Build your site locally and then push the resulting site at _site to Github.
Then push the built site's static files to your pages publishing branch (gh-pages or master depending on your site type).
GitHub Pages supports any HTML or static files you push to it so you
can use any static site generator to build your site. You can even
just push raw HTML files to GitHub Pages and it will build your site.
You can also customize your own build process locally or on another
server.
second alternative
Use a CI service like Travis, so when you push your Jekyll files to Github, it automatically builds your site and deploy it to your publishing branch.

How should I set up my repository using GitHub pages so I can see all the files that the site uses?

Can I set up my repository so that I can see all the files (html and css) that my site uses in the repository while still using the GitHub page generator?
I want to use github.com to maintain my multi page site, without installing Jekyll locally.
After you create your github repo go to the settings and select the option to host from the docs directory I found this to be the best method to host my websites that way you done have to mess with different branches unless your in to that thing.
It is not required for you to use Jekyll I personally have never used it. It is to wordpress esq.
What you can use instead of Jekyll is a static site generator or spa to precompile your website content add the static content to the doc directory and push your repo.
Github will generate a url for your that will also be available in your settings. You can also add custom domains.
I recomd using a static site generator performance and seo is the reason.
If you create a Jekyll website on your local machine in /some/path/website/, initialise your Git repository there:
cd /some/path/website/
git init
Then you can push this to your remote Github repository and all of your files will added and viewable.
I don't think you can initialise a Jekyll website in your remote repository though.
From their documentation:
Jekyll's simplified build process with GitHub Pages is one of the biggest advantages of using Jekyll instead of other static site generators. GitHub Pages manages your site's build process with a single push to your site's publishing branch. This is Jekyll's build process for managing your site:
Push file changes to your pages publishing branch (my emphasis)
GitHub Pages publishes your site.
It turned out that the reason I was not seeing many files was that there was only the index.html that I created using the tutorial at GitHub Pages
The reason I thought there must have been other files was that the theme I picked looked a whole lot better than my helloworld.html