For more information, see " Testing your GitHub Pages site locally with Jekyll." baseurl: /REPOSITORY-NAME/ # place folder name if the site is served in a subfolder url: # the base hostname and protocol for your site, e.g. For more information, see " Splitting a subfolder out into a new repository." domain: # if you want to force HTTPS, specify the domain without the http at the start, e.g. This is required for relative paths when the repository is hosted in a subdirectory. Optionally, make any necessary edits to the _config.yml file. The correct version Jekyll will be installed as a dependency of the github-pages gem.įrom the command line, run bundle install. You can find this version here: " Dependency versions." Replace GITHUB-PAGES-VERSION with the latest supported version of the github-pages gem. Change this line to: gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins # Creates a Jekyll site in the current directoryĪdd "#" to the beginning of the line that starts with gem "jekyll" to comment out this line.Īdd the github-pages gem by editing the line starting with # gem "github-pages".
To create a new Jekyll site, use the jekyll new command: $ jekyll new -skip-bundle. # Removes the contents from your default branch from the working directory # Creates a new branch, with no history or contents, called gh-pages, and switches to the gh-pages branch If you chose to publish your site from the gh-pages branch, create and checkout the gh-pages branch. For more information, see " Configuring a publishing source for your GitHub Pages site."įor example, if you chose to publish your site from the docs folder on the default branch, create and change directories to the docs folder. Navigate to the publishing source for your site. For more information, see " Configuring a publishing source for your GitHub Pages site." $ cd REPOSITORY-NAMEĭecide which publishing source you want to use. # Creates a new folder on your computer, initialized as a Git repositoryĬhange directories to the repository.
> Initialized empty Git repository in /Users/octocat/my-site/.git/ If you haven't already, initialize a local Git repository, replacing REPOSITORY-NAME with the name of your repository. If you don't already have a local copy of your repository, navigate to the location where you want to store your site's source files, replacing PARENT-FOLDER with the folder you want to contain the folder for your repository. For more information, see " Configuring GitHub Pages for your enterprise" and " About repositories." If you have sensitive data in your site's repository, you may want to remove the data before publishing. Warning: If your site administrator has enabled Public Pages, GitHub Pages sites are publicly available on the internet, even if the repository for the site is private or internal. If you're not creating your site in an existing repository, see " Creating a repository for your site." For more information, see " About repositories."īefore you can create your site, you must have a repository for your site on GitHub Enterprise Server. If your user or organization name contains uppercase letters, you must lowercase the letters.įor more information, see " About GitHub Pages." If you're creating a user or organization site, your repository must be named. Type a name for your repository and an optional description.Use the Owner drop-down menu, and select the account you want to own the repository.In the upper-right corner of any page, use the drop-down menu, and select New repository.If you want to create a site in an existing repository, skip to the " Creating your site" section. For example, you can have a dedicated branch and folder to hold your site source files.
If you want to create a GitHub Pages site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. You can either create a repository or choose an existing repository for your site. For more information, see " Troubleshooting" in the Jekyll documentation. Tip: If you see a Ruby error when you try to install Jekyll using Bundler, you may need to use a package manager, such as RVM or Homebrew, to manage your Ruby installation.