2020-06-24 00:08:43 +00:00
---
type: reference, howto
stage: Release
2020-12-01 15:09:28 +00:00
group: Release
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-24 00:08:43 +00:00
---
2021-06-10 12:10:09 +00:00
# Create a Pages website from a forked sample **(FREE)**
2020-06-24 00:08:43 +00:00
2020-12-09 12:09:42 +00:00
GitLab provides [sample projects for the most popular Static Site Generators (SSG) ](https://gitlab.com/pages ).
2020-06-24 00:08:43 +00:00
You can fork one of the sample projects and run the CI/CD pipeline to generate a Pages website.
Fork a sample project when you want to test GitLab Pages or start a new project that's already
configured to generate a Pages site.
< i class = "fa fa-youtube-play youtube" aria-hidden = "true" ></ i > Watch a [video tutorial ](https://www.youtube.com/watch?v=TWqh9MtT4Bg ) of how this works.
To fork a sample project and create a Pages website:
2020-12-17 21:09:57 +00:00
1. View the sample projects by navigating to the [GitLab Pages examples ](https://gitlab.com/pages ) group.
2021-12-08 18:12:44 +00:00
1. Select the name of the project you want to [fork ](../../repository/forking_workflow.md#creating-a-fork ).
2021-12-03 03:14:42 +00:00
1. In the top right, select **Fork** and then choose a namespace to fork to.
1. For your project, on the left sidebar, select **CI/CD > Pipelines** and then **Run pipeline** .
2020-06-24 00:08:43 +00:00
GitLab CI/CD builds and deploys your site.
The site can take approximately 30 minutes to deploy.
When the pipeline is finished, go to **Settings > Pages** to find the link to your website from your project.
For every change pushed to your repository, GitLab CI/CD runs a new pipeline
that immediately publishes your changes to the Pages site.
You can take some **optional** further steps:
2021-11-25 03:13:04 +00:00
- Remove the fork relationship. If you want to contribute to the project you forked from,
2020-06-24 00:08:43 +00:00
you can keep this relationship. Otherwise, go to your project's **Settings > General** ,
expand **Advanced settings** , and scroll down to **Remove fork relationship** :
![Remove fork relationship ](../img/remove_fork_relationship_v13_1.png )
2021-11-25 03:13:04 +00:00
- Change the URL to match your namespace. If your Pages site is hosted on GitLab.com,
2020-06-24 00:08:43 +00:00
you can rename it to `<namespace>.gitlab.io` , where `<namespace>` is your GitLab namespace
(the one you chose when you forked the project).
- Go to your project's **Settings > General** and expand **Advanced** . Scroll down to
**Change path** and change the path to `<namespace>.gitlab.io` .
For example, if your project's URL is `gitlab.com/gitlab-tests/jekyll` , your namespace is
`gitlab-tests` .
If you set the repository path to `gitlab-tests.gitlab.io` ,
the resulting URL for your Pages website is `https://gitlab-tests.gitlab.io` .
2020-12-22 18:10:05 +00:00
![Change repository's path ](../img/change_path_v12_10.png )
2020-06-24 00:08:43 +00:00
2021-01-22 09:08:53 +00:00
- Now go to your SSG's configuration file and change the [base URL ](../getting_started_part_one.md#urls-and-base-urls )
2020-10-16 18:09:04 +00:00
from `"project-name"` to `""` . The project name setting varies by SSG and may not be in the configuration file.