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
Related
We have an organization on github, and in one of the repo's I'm trying to convert it to a simple github.io page to present the MD files in the repo. I'm following this guide.
It seemed easy enough, I added an _config.yml file to the repo and enabled github pages in the settings.
The problem is that github now shows that the site is published at our www.ORGANIZATION_NAME.org/wiki. But we don't own that domain. That domain isn't a registered domain in our github organization settings. I really have no clue where it got the name from, it seems completely arbitrary.
Is there any way to get a ORGANIZATION_NAME.github.io or similar default domain?
The message from Github settings page (organization name supplanted)
Your site is published at http://www.ORAGANIZATION_NAME.org/wiki/
To use the feature where your pages are exposed on *.github.io you need to make sure your github repository follows the correct naming convention.
Use the repository name <username or org-name>.github.io the github system sees this as a "Personal Page" and exposes the repository via https://<username or org-name>.github.io.
see: https://pages.github.com/
You can can customize the exposed URL by adding the "CNAME" file at the root of the repository.
Example:
I have the github repository Loki-Astari.github.io
Github repo: https://github.com/Loki-Astari/Loki-Astari.github.io
Exposed here: https://Loki-Astari.github.io
CNAME here: https://LokiAstari.com
Another Example:
Github repo: https://github.com/academicpages/academicpages.github.io
Exposed here: https://academicpages.github.io
How to host sub project/another webapp on GitHub pages in a single account. I mean more than one. For ex: By default it is username.github.io but how can I host multiple like username.github.io/site2,username.github.io/site3, username.github.io/site4
https://help.github.com/articles/user-organization-and-project-pages/
Are you using "User Pages"? There is also "Project Pages" that can do exactly what you are looking for.
Say you have a repo my_repo, you can have a page with address http(s)://username.github.io/my_repo. Unlike User Pages repo(username.github.io), you may not want to use your master branch for Project Page. you have a couple more options - using only docs directory in your master branch, or use gh-pages branch.
This link kindly guides how to use.
I have a Github repository set up to host a small static site. The repository that hosts this is in the following format:
username.github.io
This repository is setup to use a custom domain and has a CNAME file to do so properly. This repository works exactly as expected.
Now I want to set up a project page and utilize the gh-pages branch for a different repository. When I do this, though, the CNAME in the first repository seems to apply and I am redirected to example.com/REPOSITORYNAME instead of using the expected username.github.io/projectname associated with this separate repository.
How can I continue to use the username.github.io repository with a custom domain and the gh-pages branch on a different repository without redirecting the gh-pages repository to the custom domain defined in the first repository?
As of Aug 2016, I don't think this is possible. (https://help.github.com/articles/custom-domain-redirects-for-github-pages-sites/)
The Github Pages help article states that
Project Pages site owned by a user account, such as username.github.io/projectname, will be Automatically redirected to a subdirectory of a User Pages site custom domain (user.example.com/projectname), unless a different CNMAE is specified, such as project.example.com
See Github pages - Disable custom domain redirection for all but a single site?
The easiest way is to create a Github Organisation for each website you decide to manage this way.
In this case, I had to publish to master instead of gh-pages.
More informations here : https://help.github.com/articles/user-organization-and-project-pages/
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!
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.