Followed the Jekyll documentation direction and pushed the folder directly under master branch and when that didn't work, also set up the gh-pages branch and pushed just the site folder contents under it. Still didn't work.
github: https://github.com/shinshinwu/shinshinwu.github.io
my _config.yml setting:
# Site settings
title: Anna's Chunky Bacon and Sweater House
description: Programming and all other random thoughts
baseurl: /myblog/ # the subpath of your site, e.g. /blog/
url: "http://localhost:4000" # the base hostname & protocol for your site
# Build settings
markdown: kramdown
Any tips would be helpful! Thanks a ton!
The reason is that your _config.yml is not at the root, with source and destination variables set.
But, the easiest way is to create a https://github.com/shinshinwu/myblog repository and put your jekyll blog in its gh-pages branch.
The url will still be shinshinwu.github.io/myblog and you avoid mixing Jekyll and non Jekyll things.
Related
I have been learning how to use Docusaurus to make markdown documentation websites recently.
My exact questions are:
How do I have to name the repository
What do I have to change in this config: https://i.stack.imgur.com/4WAhY.png
What branch do I need for what?
My goal is to create a site at ruixey.github.io, not at ruixey.github.io/REPO_NAME/
Thanks in advance for any help
Docusaurus side
Everything I can see looks correct according to the documentation Docusaurus provides:
Deploying to GitHub Pages | Docusaurus.
It states the following about which branch is used:
GitHub Pages picks up files from the default branch (master/main) or the gh-pages branch ...
and for deploying to the GH Page:
We provide a docusaurus deploy command
GitHub Pages side
Regarding your repository name, I recommend you to read the documentation that GitHub provides on Pages, which goes over the naming conventions when setting up a self-titled GitHub Pages deployment: Creating a GitHub Pages site
These docs say the following about choosing a repository name:
If you're creating a user site, your repository must be named <user>.github.io ...
If your user name contains uppercase letters, you must lowercase
the letters.
Source: Creating a repository for your site
Have you tried to deploy with your current configuration file? I don't see a reason why it should fail.
What do I have to change in this config
Assuming your repo URI is something like: git#github.com:Ruixey/roblox.git
organizationName: 'Ruixey', // Usually your GitHub org/user name.
projectName: 'roblox', // Usually your repo name.
// git#github.com:Ruixey/roblox.git <-- your ssh URI
// ^ ^
// organizationName projectName
What branch do I need for what?
main for your source, when you deploy, docusaurus will push to gh-pages branch, if the branch does not exist, this creates it.
$ USE_SSH=true yarn deploy
I'm trying to set up a personal website (with a custom domain and hosted on GitHub Pages) that would allow me to display the following:
username.com - custom domain with my own code (not through Jekyll)
username.com/blog - sub-directory blog (through Jekyll)
I'm not sure how I should go about this. I've tried other online tutorials, but most of them deal with sub-domains (not sub-directories), use the default github.io project domain (not custom domain), or just don't work. Any help would be greatly appreciated.
I ended up solving the issue myself: I figured out that the main problem I was having was that my username.com website was hosted as a Project Site and not a User/Organization Site. The fix was to create a User/Organization Site repository called username.github.io and then apply the CNAME/DNS changes redirecting to username.com.
(A little sad though, I was using username.github.io as a testing site.)
From there, all repositories that are published to gh-pages branch would show up as sub-directories of the User/Organization Site. If CNAME/DNS was left unchanged, a repository named blog would show as username.github.io/blog; since I changed CNAME/DNS settings, the repository named blog showed up as username.com/blog.
Hope that helps anyone else going through similar issues! Good luck all!
All you need to do is have the following in your Jekyll config file:
# _config.yml
url: "https://username.com"
baseurl: "/blog"
Then ensure that you use relative_url and absolute_url filters for your link refs. For example:
{{ page.title }}
Finally generate a production _site:
bundle exec jekyll build
# or if you don't have a Gemfile
jekyll build
I hope someone can help me to figure this out since i've been trying several thing throughout the day and I still couldn't find the root of this issue. The github is failing to load the jekyll content... giving me several error at every attempt... I searched for similar issues here and i also modified my yml file in the url as suggested in other posts but with no success. If someone could help me i would appreciate since i just literally lost atm. tia
https://github.com/CarlasHub
enter image description here
In _config.yml, set :
baseurl: "/carlashub"
url: "https://CarlasHub.github.io"
Have you set Github Pages up in the settings within the Github repo?
goto --
Settings > Options > Scroll down > GitHub Pages
Make sure you have selected the source, this will generate a CNAME file in your repo which will contain the URL. After a short while, you will be able to see your site.
Below is an example of the config.yaml I use on most of my projects.
title: Site Title
url: "https://domainame.com"
baseurl: /
google_analytics_key:
email:
description: Test stuff.
# Build settings
paginate: 5
paginate_path: "/blog/:num/"
permalink: pretty
markdown: kramdown
permalink: /:title/
sass:
style: compressed
plugins:
- jekyll-feed
exclude:
- Gemfile
- Gemfile.lock
plugins: [jekyll-paginate]
http://leongaban.github.io/leongaban-10/ (<- displaying the default github page theme)
Here is my repo with a jekyll blog that works 100% locally, I did create the gh-pages branch. Below is a screenshot of what the blog should look like on my github page:
Do I need to change anything here in my _config.yml?
Site settings
title: Leon Gaban
email: leongaban#gmail.com
description: "Leon Gaban"# this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://leongaban.com" # the base hostname & protocol for your site
twitter_username: leongaban
github_username: leongaban
# Build settings
markdown: kramdown
The name of your repository must end in github.com/github.io i.e. rename your https://github.com/leongaban/leongaban-10/ repo to: https://github.com/leongaban/leongaban.github.io
Add this to your _config.yml:
kramdown:
input: GFM
in order to keep the same markdown GitHub will use.
Also, if it is your user website username.github.io it's better move it to a master branch. gh-pages branch is supposed to be applied to project websites only.
Your _site folder is not supposed to be there. It contains the site already build. Normally it's useful for local preview and when you're hosting with a service that doesn't build Jekyll automatically, like an Apache server. Also when you use Jekyll plugins that are not allowed by GitHub, so you choose building the site locally and uploading the static site only to GH.
I see two approaches: weather you remove the _site folder and move your project to the master branch, or you remove the rest of the content and upload to your repo only the content of the _site folder (not the folder itself).
Hope to have helped!
I recently wanted to publish my Jekyll site on Github pages, but it seems that putting everything in a subdirectory is giving some issues, even after I change the source to the correct directory.
My structure looks like this:
- site
- src (contains all Jekyll stuff)
- README.md
- GruntFile.js
- ...
Locally my site builds perfectly and when I go to http://localhost:4040 I can see it just nicely, but when I commit this to my Github and visit username.github.io I get a 404, if I go to username.github.io/src I can see part of my site, however all {% include %} are ignored.
In my _config.yml I updated the source: source: ./src, but that doesn't seem to help.
Is there a way to make Github Pages handle subdirectories properly? Basically I want to tell it that my Jekyll site is inside /src, and I want the url to just be username.github.io instead of username.github.io/src
I know i can use the pages branch and commit to there, but I would prefer if it could happen automaticly.
If it helps anyone, I attempted to run Jekyll on GH Pages from a subdir (and modified source) and was banging my head against the wall over these errors:
A file was included in subdir/index.html that is a symlink or does not exist in your _includes directory. For more information, see https://help.github.com/articles/page-build-failed-file-is-a-symlink.
After much searching on this, the definitive answer was right there in the docs:
Configuration Overrides
We override the following _config.yml values, which you are unable to
configure:
safe: true
lsi: false
source: your top-level directory
Keep in mind that if you change the source setting, your pages may not
build correctly. GitHub Pages only considers source files in the
top-level directory of a repository.
I contact Github support and they gave me 2 solutions.
Move all my Jekyll source files to my top-lever directory.
Use a different branch and update it manually each time.