title | intro | redirect_from | product | versions | topics | shortTitle | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creating a GitHub Pages site |
You can create a {% data variables.product.prodname_pages %} site in a new or existing repository. |
|
{% data reusables.gated-features.pages %} |
|
|
Create a GitHub Pages site |
{% data reusables.pages.org-owners-can-restrict-pages-creation %}
{% data reusables.pages.new-or-existing-repo %}
{% data reusables.repositories.create_new %} {% data reusables.repositories.owner-drop-down %} {% indented_data_reference reusables.pages.emu-org-only spaces=3 %} {% data reusables.pages.create-repo-name %} {% data reusables.repositories.choose-repo-visibility %} {% data reusables.repositories.initialize-with-readme %} {% data reusables.repositories.create-repo %}
{% data reusables.pages.must-have-repo-first %}
{% data reusables.pages.private_pages_are_public_warning %}
{% data reusables.pages.navigate-site-repo %} {% data reusables.pages.decide-publishing-source %}
-
Create the entry file for your site. {% data variables.product.prodname_pages %} will look for an
index.html
,index.md
, orREADME.md
file as the entry file for your site.If your publishing source is a branch and folder, the entry file must be at the top level of the source folder on the source branch. For example, if your publishing source is the
/docs
folder on themain
branch, your entry file must be located in the/docs
folder on a branch calledmain
.If your publishing source is a {% data variables.product.prodname_actions %} workflow, the artifact that you deploy must include the entry file at the top level of the artifact. Instead of adding the entry file to your repository, you may choose to have your {% data variables.product.prodname_actions %} workflow generate your entry file when the workflow runs. {% data reusables.pages.configure-publishing-source %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} {% data reusables.pages.choose-visibility %} {% data reusables.pages.visit-site %} {% data reusables.pages.check-workflow-run %}
{% data reusables.pages.admin-must-push %}
You can add more pages to your site by creating more new files. Each file will be available on your site in the same directory structure as your publishing source. For example, if the publishing source for your project site is the gh-pages
branch, and you create a new file called /about/contact-us.md
on the gh-pages
branch, the file will be available at {% ifversion fpt or ghec %}https://<user>.github.io/<repository>/{% else %}
http(s):///pages///{% endif %}about/contact-us.html`.
You can also add a theme to customize your site’s look and feel. For more information, see "AUTOTITLE".
To customize your site even more, you can use Jekyll, a static site generator with built-in support for {% data variables.product.prodname_pages %}. For more information, see "AUTOTITLE".