Artikelversion: GitHub.com
Eine GitHub Pages-Website erstellen
Sie können eine GitHub Pages-Website in einem neuen oder vorhandenen Repository erstellen.
GitHub Pages is available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see "GitHub's products."
Ein Repository für eine Website erstellen
If your site is an independent project, you can create a new repository to store your site's source code. If your site is associated with an existing project, you can add the source code for your site to a gh-pages branch or a docs folder on the master branch in that project's repository. For example, if you're creating a site to publish documentation for a project that's already on GitHub, you may want to store the source code for the site in the same repository as the project.
If you want to create a site in an existing repository, skip to the "Creating your site" section.
Warning: GitHub Pages sites are publicly available on the internet, even if their repositories are private or internal. If you have sensitive data in your site's repository, you may want to remove it before publishing. For more information, see "About repository visibility."
- In the upper-right corner of any page, use the drop-down menu, and select New repository.

- Use the Owner drop-down menu, and select the account you want to own the repository.

- Geben Sie einen Namen für Ihr Repository sowie optional eine Beschreibung ein. If you're creating a user or organization site, your repository must be named
<user>.github.ioor<organization>.github.io. Weitere Informationen finden Sie unter „Informationen zu GitHub Pages“.
- Choose a repository visbility. For more information, see "About repository visibility."

- Wählen Sie Initialize this repository with a README (Dieses Repository mit einer README-Datei initialisieren) aus.

- Klicken Sie auf Create repository (Repository erstellen).
Eine Website erstellen
Before you can create your site, you must have a repository for your site on GitHub. If you're not creating your site in an existing repository, see "Creating a repository for your site."
-
On GitHub, navigate to your site's repository.
-
If you're creating a project site, decide which publishing source you want to use. If you're creating a user or organization site, you must store your site's source code on the
masterbranch. For more information, see "About GitHub Pages." -
Wenn Ihre ausgewählte Veröffentlichungsquelle bereits vorhanden ist, navigieren Sie zu dieser Quelle. Wenn Ihre ausgewählte Veröffentlichungsquelle nicht vorhanden ist, erstellen Sie die Veröffentlichungsquelle.
-
Erstellen Sie im Root der Veröffentlichungsquelle eine neue Datei mit dem Namen
index.md, die den Inhalt enthält, der auf der Hauptseite Ihrer Website angezeigt werden soll. -
If you're using a non-default publishing source for a project site, configure your publishing source. Weitere Informationen finden Sie unter „Eine Veröffentlichungsquelle für Ihre GitHub Pages-Website konfigurieren“.
-
Under your repository name, click Settings.

-
To see your published site, under "GitHub Pages", click your site's URL.

Hinweis: Es kann bis zu 20 Minuten dauern, bis die Änderungen auf Ihrer Website veröffentlicht werden, nachdem Sie die Änderungen zu GitHub gepusht haben. If your don't see your changes reflected in your browser after an hour, see "About Jekyll build errors for GitHub Pages sites."
Note: If your site's source files are located in the default publishing source—master for user and organization sites or gh-pages for project sites—but your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the default publishing source.
Nächste Schritte:
Sie können Ihrer Website weitere Seiten hinzufügen, indem Sie zusätzliche neue Dateien erstellen. Jede Datei wird auf Ihrer Website im selben Verzeichnis verfügbar sein wie Ihre Veröffentlichungsquelle. Wenn beispielsweise die Veröffentlichungsquelle für Ihre Projekt-Website der Branch gh-pages ist und Sie eine neue Datei mit dem Namen /about/contact-us.md auf dem Branch gh-pages erstellen, ist die Datei unter https://<user>.github.io/<repository>/about/contact-us.md verfügbar.
Sie können auch ein Design hinzufügen, um das Aussehen der Website anzupassen. Weitere Informationen finden Sie unter „Ein Design mit dem Theme Chooser zu Ihrer GitHub Pages-Website hinzufügen“.
Um Ihre Website noch weiter anzupassen, können Sie Jekyll verwenden, einen Generator für statische Websites mit integrierter Unterstützung von GitHub Pages. Weitere Informationen finden Sie unter „Informationen zu GitHub Pages und Jekyll“.