Commit 2fb396e3 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'sse_image_upload_path_docs' into 'master'

Add documentation for SSE image upload config

See merge request gitlab-org/gitlab!47480
parents 5dd595b6 b6ab36c0
......@@ -66,10 +66,12 @@ easily [edit your content](#edit-content).
1. To get started, create a new project from the [Static Site Editor - Middleman](https://gitlab.com/gitlab-org/project-templates/static-site-editor-middleman)
template. You can either [fork it](../repository/forking_workflow.md#creating-a-fork)
or [create a new project from a template](../../../gitlab-basics/create-project.md#built-in-templates).
1. Edit the [`data/config.yml`](#configuration-files) configuration file
1. Edit the [`data/config.yml`](#static-site-generator-configuration) configuration file
to replace `<username>` and `<project-name>` with the proper values for
your project's path. This triggers a CI/CD pipeline to deploy your project
with GitLab Pages.
your project's path.
1. (Optional) Edit the [`.gitlab/static-site-editor.yml`](#static-site-editor-configuration-file) file
to customize the behavior of the Static Site Editor.
1. When you submit your changes, GitLab triggers a CI/CD pipeline to deploy your project with GitLab Pages.
1. When the pipeline finishes, from your project's left-side menu, go to **Settings > Pages** to find the URL of your new website.
1. Visit your website and look at the bottom-left corner of the screen to see the new **Edit this page** button.
......@@ -179,6 +181,41 @@ yet. You can do so by editing the file locally, through the GitLab regular file
## Configuration files
You can customize the behavior of a project which uses the Static Site Editor with
the following configuration files:
- The [`.gitlab/static-site-editor.yml`](#static-site-editor-configuration-file), which customizes the
behavior of the Static Site Editor.
- [Static Site Generator configuration files](#static-site-generator-configuration),
such as `data/config.yml`, which configures the Static Site Generator itself.
It also controls the **Edit this page** button when the site is generated.
### Static Site Editor configuration file
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4267) in GitLab 13.6.
The `.gitlab/static-site-editor.yml` configuration file contains entries you can
use to customize behavior of the Static Site Editor (SSE). If the file does not exist,
default values which support a default Middleman project configuration are used.
The [Static Site Editor - Middleman](https://gitlab.com/gitlab-org/project-templates/static-site-editor-middleman) project template generates a file pre-populated with these defaults.
To customize the behavior of the SSE, edit `.gitlab/static-site-editor.yml`'s entries
(described in the table below) according to what works best for your project (respecting YAML syntax).
After the table, see an [example of the SSE configuration file](#gitlabstatic-site-editoryml-example).
| Entry | GitLab version | Type | Default value | Description |
|---|---|---|---|---|
| `image_upload_path` | [13.6](https://gitlab.com/gitlab-org/gitlab/-/issues/216641) | String | `source/images` | Directory for images uploaded from the WYSIWYG editor. |
#### `.gitlab/static-site-editor.yml` example
```yaml
image_upload_path: 'source/images' # Relative path to the project's root. Don't include leading or trailing slashes.
```
### Static Site Generator configuration
The Static Site Editor uses Middleman's configuration file, `data/config.yml`
to customize the behavior of the project itself and to control the **Edit this
page** button, rendered through the file [`layout.erb`](https://gitlab.com/gitlab-org/project-templates/static-site-editor-middleman/-/blob/master/source/layouts/layout.erb).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment