-
Notifications
You must be signed in to change notification settings - Fork 857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instructions for GitLab Pages #1287
Open
hansfn
wants to merge
5
commits into
quarto-dev:main
Choose a base branch
from
hansfn:gitlab-pages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−4
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: "GitLab Pages" | ||
--- | ||
|
||
## Overview | ||
|
||
[GitLab Pages](https://pages.github.com/) is a website hosting service that enables you to publish content based on source code managed within a GitLab repository. | ||
|
||
There s currently only one way to publish Quarto websites and documents to GitLab Pages: | ||
|
||
1. Use a [GitLab Pipeline] to automatically render your files (a single Quarto document or a Quarto project) and publish the resulting content whenever you push a source code change to your repository. | ||
|
||
We'll cover each of these methods below, but first an important pre-requisite: you need to have a Git repository on your local machine that is synced to GitLab. The URL of the published website will be derived from the combination of your username and the repository name (e.g. `https://username.gitlab.io/reponame/`). | ||
|
||
You can optionally configure a [custom domain](https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/) for a GitLab Pages site, but before exploring that ground you should get your site up and running with the default domain. | ||
|
||
### GitLab Pipeline | ||
|
||
Before setting up the pipeline, add at least one file that will get rendered and deployed. Enable the pipeline by adding a `.gitlab-ci.yml` file to your repository: | ||
|
||
``` {.yaml filename=".gitlab-ci.yml"} | ||
image: ghcr.io/quarto-dev/quarto:latest | ||
|
||
pages: | ||
script: | ||
- quarto render --execute --to html --output-dir public | ||
artifacts: | ||
paths: | ||
- public | ||
``` | ||
|
||
This pipeline will run whenever you push to your repository. It will also run when you manually trigger the pipeline from the **Build - Pipelines** page of your repository. | ||
|
||
The pipeline will render your content and publish it to GitLab Pages using the minimal [official Docker image](https://github.com/orgs/quarto-dev/packages) from Quarto. Switch from `ghcr.io/quarto-dev/quarto:latest` to `ghcr.io/quarto-dev/quarto-full:latest` to get programming and LaTeX support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this missing an external link or aim is to reference the section below ?
For the later case, I think we should make the link explicit using an explicit id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just using the same trick (?) that is used in github-pages.qmd: A link with no target pointing to an anchor for a heading on the same page.