Commit 72220b24 authored by Amy Qualls's avatar Amy Qualls Committed by Craig Norris

Line and word edits to Create documentation

Line and word edits to Create documentation for tone and style.
In one case, remove a badly out-of-date image. Also rewrites a few
paragraphs into procedures.
parent 88e3fdc4
...@@ -14,7 +14,7 @@ Editor Lite is a thin wrapper around [the Monaco editor](https://microsoft.githu ...@@ -14,7 +14,7 @@ Editor Lite is a thin wrapper around [the Monaco editor](https://microsoft.githu
## How to use Editor Lite ## How to use Editor Lite
Editor Lite is framework-agnostic and can be used in any application, whether it's Rails or Vue. For the convenience of integration, we have [the dedicated `<editor-lite>` Vue component](#vue-component), but in general, the integration of Editor Lite is pretty straightforward: Editor Lite is framework-agnostic and can be used in any application, whether it's Rails or Vue. For the convenience of integration, we have the dedicated `<editor-lite>` Vue component, but in general, the integration of Editor Lite is pretty straightforward:
1. Import Editor Lite: 1. Import Editor Lite:
...@@ -225,7 +225,3 @@ Just pass the array of extensions to your `use` method: ...@@ -225,7 +225,3 @@ Just pass the array of extensions to your `use` method:
```javascript ```javascript
editor.use([FileTemplateExtension, MyFancyExtension]); editor.use([FileTemplateExtension, MyFancyExtension]);
``` ```
## <a id="vue-component"></a>`<editor-lite>` Vue component
TBD
...@@ -21,8 +21,8 @@ Choose **New file** from the dropdown. ...@@ -21,8 +21,8 @@ Choose **New file** from the dropdown.
Enter a filename in the **Filename** box. Then, add file content in the editor Enter a filename in the **Filename** box. Then, add file content in the editor
area. Add a descriptive commit message and choose a branch. The branch field area. Add a descriptive commit message and choose a branch. The branch field
will default to the branch you were viewing in the file browser. If you enter defaults to the branch you were viewing in the file browser. If you enter
a new branch name, a checkbox will appear, allowing you to start a new merge a new branch name, a checkbox displays, allowing you to start a new merge
request after you commit the changes. request after you commit the changes.
When you are satisfied with your new file, click **Commit Changes** at the bottom. When you are satisfied with your new file, click **Commit Changes** at the bottom.
...@@ -31,46 +31,45 @@ When you are satisfied with your new file, click **Commit Changes** at the botto ...@@ -31,46 +31,45 @@ When you are satisfied with your new file, click **Commit Changes** at the botto
### Shortcuts ### Shortcuts
You can use handy shortcuts when editing a file through the Web Editor, which are the same as You can use shortcuts when editing a file through the Web Editor. It uses the same shortcuts
the Web IDE's. For details, see the documentation for [Command Palette](../web_ide/index.md#command-palette). as the Web IDE. For details, read the documentation for [Command Palette](../web_ide/index.md#command-palette).
### Template dropdowns ### Template dropdowns
When starting a new project, there are some common files that the new project When starting a new project, there are some common files that the new project
might need too. Therefore a message will be displayed by GitLab to make this might need. GitLab displays a message to help you:
easy for you.
![First file for your project](img/web_editor_template_dropdown_first_file.png) ![First file for your project](img/web_editor_template_dropdown_first_file.png)
When clicking on either `LICENSE` or `.gitignore` and so on, a dropdown will be displayed When clicking on either `LICENSE` or `.gitignore` and so on, a dropdown displays
to provide you with a template that might be suitable for your project. to provide you a template that may be suitable for your project:
![MIT license selected](img/web_editor_template_dropdown_mit_license.png) ![MIT license selected](img/web_editor_template_dropdown_mit_license.png)
The license, changelog, contribution guide, or `.gitlab-ci.yml` file could also The license, changelog, contribution guide, or `.gitlab-ci.yml` file can also
be added through a button on the project page. In the example below, the license be added through a button on the project page. In this example, the license
has already been created, which creates a link to the license itself. has already been created, which creates a link to the license itself.
![New file button](img/web_editor_template_dropdown_buttons.png) ![New file button](img/web_editor_template_dropdown_buttons.png)
NOTE: NOTE:
The **Set up CI/CD** button will not appear on an empty repository. You have to at The **Set up CI/CD** button does not appear on an empty repository. For the button
least add a file in order for the button to show up. to display, add a file to your repository.
## Upload a file ## Upload a file
The ability to create a file is great when the content is text. However, this The ability to create a file is great when the content is text. However, this
doesn't work well for binary data such as images, PDFs, or other file types. In doesn't work well for binary data such as images, PDFs, or other binary file types. In
this case, you need to upload a file. this case, you need to upload a file.
From a project's files page, click the '+' button to the right of the branch From a project's files page, click the '+' button to the right of the branch
selector. Choose **Upload file** from the dropdown. selector. Choose **Upload file** from the dropdown:
![Upload file dropdown menu](img/web_editor_upload_file_dropdown.png) ![Upload file dropdown menu](img/web_editor_upload_file_dropdown.png)
Once the upload dialog pops up, there are two ways to upload your file. Either After the upload dialog pops up, there are two ways to upload your file. Either
drag and drop a file on the popup or use the **click to upload** link. A file drag and drop a file on the popup or use the **click to upload** link. After you
preview will appear once you have selected a file to upload. select a file to upload, a file preview displays.
Enter a commit message, choose a branch, and click **Upload file** when you are Enter a commit message, choose a branch, and click **Upload file** when you are
ready. ready.
...@@ -100,19 +99,22 @@ There are multiple ways to create a branch from the GitLab web interface. ...@@ -100,19 +99,22 @@ There are multiple ways to create a branch from the GitLab web interface.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2808) in GitLab 8.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2808) in GitLab 8.6.
If your development workflow dictates to have an issue for every merge If your development workflow requires an issue for every merge
request, you can quickly create a branch directly from the issue to speed the process up. request, you can create a branch directly from the issue to speed the process up.
The new branch, and later its merge request, will be marked as related to this issue. The new branch, and later its merge request, are marked as related to this issue.
Once merged, the MR will automatically close the issue. Once merged, the merge request closes the issue.
You can see a **Create merge request** dropdown below the issue description. You can see a **Create merge request** dropdown below the issue description.
NOTE: The **Create merge request** button doesn't display if:
You won't see the **Create merge request** button if there is already a branch with the same
name or a referenced merge request or your project has an active - A branch with the same name already exists.
fork relationship. - The branch already has a referenced merge request.
If you would like to make this button appear, a possible workaround is to [remove your project's - Your project has an active fork relationship.
fork relationship](../settings/index.md#removing-a-fork-relationship). Once removed, the fork
relationship cannot be restored. This project will no longer be able to receive or send merge requests to the source project or other forks. To make this button appear, one possible workaround is to
[remove your project's fork relationship](../settings/index.md#removing-a-fork-relationship).
After removal, the fork relationship cannot be restored. This project can no longer
be able to receive or send merge requests to the source project, or other forks.
![Create Button](img/web_editor_new_branch_from_issue_create_button_v12_6.png) ![Create Button](img/web_editor_new_branch_from_issue_create_button_v12_6.png)
...@@ -120,46 +122,47 @@ This dropdown contains the options **Create merge request and branch** and **Cre ...@@ -120,46 +122,47 @@ This dropdown contains the options **Create merge request and branch** and **Cre
![New Branch Button](img/web_editor_new_branch_from_issue_v_12_6.png) ![New Branch Button](img/web_editor_new_branch_from_issue_v_12_6.png)
Once you choose one of these options, a new branch or branch and merge request After selecting one of these options, a new branch or branch and merge request
will be created based on the default is created based on your project's default branch. By default, this branch is `master`.
branch of your project (by default, `master`). The branch name will be based on The branch name is based on an internal ID, and the issue title. The example
the title of the issue, and as a prefix, it will have its internal ID. Thus, the example screenshot above creates a branch named
screenshot above will create a branch named
`2-make-static-site-auto-deploy-and-serve`. `2-make-static-site-auto-deploy-and-serve`.
When you click the **Create branch** button in an empty When you click the **Create branch** button in an empty
repository project, GitLab automatically creates a `master` branch, commits repository project, GitLab performs these actions:
a blank `README.md` file to it, and creates and redirects you to a new branch
based on the issue title. - Creates a `master` branch.
If your [project is already configured with a deployment service](../integrations/overview.md), - Commits a blank `README.md` file to it.
such as Kubernetes, GitLab takes one step further and prompts you to set up - Creates and redirects you to a new branch based on the issue title.
[auto deploy](../../../topics/autodevops/stages.md#auto-deploy) - _If your project is [configured with a deployment service](../integrations/overview.md) like Kubernetes,_
by helping you create a `.gitlab-ci.yml` file. GitLab prompts you to set up [auto deploy](../../../topics/autodevops/stages.md#auto-deploy)
by helping you create a `.gitlab-ci.yml` file.
After the branch is created, you can edit files in the repository to fix After the branch is created, you can edit files in the repository to fix
the issue. When a merge request is created based on the newly created branch, the issue. When a merge request is created based on the newly-created branch,
the description field will automatically display the [issue closing pattern](../issues/managing_issues.md#closing-issues-automatically) the description field displays the [issue closing pattern](../issues/managing_issues.md#closing-issues-automatically)
`Closes #ID`, where `ID` the ID of the issue. This will close the issue once the `Closes #ID`, where `ID` is the ID of the issue. This closes the issue when the
merge request is merged. merge request is merged.
### Create a new branch from a project's dashboard ### Create a new branch from a project's dashboard
If you want to make changes to several files before creating a new merge If you want to make changes to several files before creating a new merge
request, you can create a new branch upfront. From a project's files page, request, you can create a new branch upfront.
choose **New branch** from the dropdown.
![New branch dropdown](img/web_editor_new_branch_dropdown.png) 1. From a project's files page, choose **New branch** from the dropdown.
Enter a new **Branch name**. Optionally, change the **Create from** field ![New branch dropdown](img/web_editor_new_branch_dropdown.png)
to choose which branch, tag, or commit SHA this new branch will originate from.
This field will autocomplete if you start typing an existing branch or tag.
Click **Create branch** and you will be returned to the file browser on this new
branch.
![New branch page](img/web_editor_new_branch_page.png) 1. Enter a new **Branch name**.
1. (Optional) Change the **Create from** field to choose which branch, tag, or
commit SHA this new branch originates from. This field autocompletes if you
start typing an existing branch or tag.
1. Click **Create branch** to return to the file browser on this new branch.
![New branch page](img/web_editor_new_branch_page.png)
You can now make changes to any files, as needed. When you're ready to merge You can now make changes to any files, as needed. When you're ready to merge
the changes back to master, you can use the widget at the top of the screen. the changes back to `master`, you can use the widget at the top of the screen.
This widget only appears for a period of time after you create the branch or This widget only appears for a period of time after you create the branch or
modify files. modify files.
...@@ -167,31 +170,35 @@ modify files. ...@@ -167,31 +170,35 @@ modify files.
## Create a new tag ## Create a new tag
Tags are useful for marking major milestones such as production releases, Tags help you mark major milestones such as production releases and
release candidates, and more. You can create a tag from a branch or a commit release candidates. You can create a tag from a branch or a commit
SHA. From a project's files page, choose **New tag** from the dropdown. SHA:
1. From a project's files page, choose **New tag** from the dropdown.
![New tag dropdown](img/web_editor_new_tag_dropdown.png) ![New tag dropdown](img/web_editor_new_tag_dropdown.png)
Give the tag a name such as `v1.0.0`. Choose the branch or SHA from which you 1. Give the tag a name such as `v1.0.0`.
would like to create this new tag. You can optionally add a message and 1. Choose the branch or SHA from which you want to create this new tag.
release notes. The release notes section supports Markdown format and you can 1. (Optional) Add a message and release notes. The release notes section supports
also upload an attachment. Click **Create tag**, and you will be taken to the tag Markdown format.
list page. 1. (Optional) Upload an attachment.
1. Click **Create tag**, and GitLab redirects you to the tag list page.
![New tag page](img/web_editor_new_tag_page.png) ![New tag page](img/web_editor_new_tag_page.png)
## Tips ## Tips
When creating or uploading a new file or creating a new directory, you can When creating or uploading a new file or creating a new directory, you can
trigger a new merge request rather than committing directly to `master`. Enter trigger a new merge request rather than committing directly to `master`:
a new branch name in the **Target branch** field. You will notice a checkbox
appear that is labeled **Start a new merge request with these changes**. After 1. Enter a new branch name in the **Target branch** field.
you commit the changes you will be taken to a new merge request form. 1. GitLab displays the **Start a new merge request with these changes** check box.
1. Commit your changes, and GitLab redirects you to a new merge request form.
![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) ![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png)
If you'd prefer _not_ to use your primary email address for commits created If you'd prefer to not use your primary email address for commits created
through the web editor, you can choose to use another of your linked email through the web editor, you can choose to use another of your linked email
addresses from the **User Settings > Edit Profile** page. addresses from the **User Settings > Edit Profile** page.
......
...@@ -23,8 +23,8 @@ and submit the changes for review. ...@@ -23,8 +23,8 @@ and submit the changes for review.
The Static Site Editor allows collaborators to submit changes to static site The Static Site Editor allows collaborators to submit changes to static site
files seamlessly. For example: files seamlessly. For example:
- Non-technical collaborators can easily edit a page directly from the browser; - Non-technical collaborators can edit a page directly from the browser.
they don't need to know Git and the details of your project to be able to contribute. They don't need to know Git and the details of your project to contribute.
- Recently hired team members can quickly edit content. - Recently hired team members can quickly edit content.
- Temporary collaborators can jump from project to project and quickly edit pages instead - Temporary collaborators can jump from project to project and quickly edit pages instead
of having to clone or fork every single project they need to submit changes to. of having to clone or fork every single project they need to submit changes to.
...@@ -68,7 +68,7 @@ The editor can then navigate to the merge request to assign it to a colleague fo ...@@ -68,7 +68,7 @@ The editor can then navigate to the merge request to assign it to a colleague fo
## Set up your project ## Set up your project
First, set up the project. Once done, you can use the Static Site Editor to First, set up the project. Once done, you can use the Static Site Editor to
easily [edit your content](#edit-content). [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) 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) template. You can either [fork it](../repository/forking_workflow.md#creating-a-fork)
...@@ -101,7 +101,7 @@ To edit a file: ...@@ -101,7 +101,7 @@ To edit a file:
wish to edit the raw Markdown instead, you can toggle the **Markdown** mode wish to edit the raw Markdown instead, you can toggle the **Markdown** mode
in the bottom-right corner. in the bottom-right corner.
1. When you're done, click **Submit changes...**. 1. When you're done, click **Submit changes...**.
1. (Optional) Adjust the default title and description of the merge request that will be submitted 1. (Optional) Adjust the default title and description of the merge request, to submit
with your changes. Alternatively, select a [merge request template](../../../user/project/description_templates.md#creating-merge-request-templates) with your changes. Alternatively, select a [merge request template](../../../user/project/description_templates.md#creating-merge-request-templates)
from the dropdown menu and edit it accordingly. from the dropdown menu and edit it accordingly.
1. Click **Submit changes**. 1. Click **Submit changes**.
...@@ -154,9 +154,9 @@ so you can verify the correct image is included and there aren't any references ...@@ -154,9 +154,9 @@ so you can verify the correct image is included and there aren't any references
You can embed YouTube videos on the WYSIWYG mode by clicking the video icon (**{live-preview}**). You can embed YouTube videos on the WYSIWYG mode by clicking the video icon (**{live-preview}**).
The following URL/ID formats are supported: The following URL/ID formats are supported:
- YouTube watch URL (e.g. `https://www.youtube.com/watch?v=0t1DgySidms`) - **YouTube watch URLs**: `https://www.youtube.com/watch?v=0t1DgySidms`
- YouTube embed URL (e.g. `https://www.youtube.com/embed/0t1DgySidms`) - **YouTube embed URLs**: `https://www.youtube.com/embed/0t1DgySidms`
- YouTube video ID (e.g. `0t1DgySidms`) - **YouTube video IDs**: `0t1DgySidms`
### Front matter ### Front matter
...@@ -164,13 +164,13 @@ The following URL/ID formats are supported: ...@@ -164,13 +164,13 @@ The following URL/ID formats are supported:
> - Ability to edit page front matter [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/235921) in GitLab 13.5. > - Ability to edit page front matter [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/235921) in GitLab 13.5.
Front matter is a flexible and convenient way to define page-specific variables in data files Front matter is a flexible and convenient way to define page-specific variables in data files
intended to be parsed by a static site generator. It is commonly used for setting a page's intended to be parsed by a static site generator. Use it to set a page's
title, layout template, or author, but can be used to pass any kind of metadata to the title, layout template, or author. You can also pass any kind of metadata to the
generator as the page renders out to HTML. Included at the very top of each data file, the generator as the page renders out to HTML. Included at the very top of each data file, the
front matter is often formatted as YAML or JSON and requires consistent and accurate syntax. front matter is often formatted as YAML or JSON, and requires consistent and accurate syntax.
To edit the front matter from the Static Site Editor you can use the GitLab regular file editor, To edit the front matter from the Static Site Editor you can use the GitLab regular file editor,
the Web IDE, or easily update the data directly from the WYSIWYG editor: the Web IDE, or update the data directly from the WYSIWYG editor:
1. Click the **Page settings** button on the bottom-right to reveal a web form with the data you 1. Click the **Page settings** button on the bottom-right to reveal a web form with the data you
have on the page's front matter. The form is populated with the current data: have on the page's front matter. The form is populated with the current data:
...@@ -181,10 +181,16 @@ the Web IDE, or easily update the data directly from the WYSIWYG editor: ...@@ -181,10 +181,16 @@ the Web IDE, or easily update the data directly from the WYSIWYG editor:
1. When you're done, click **Submit changes...**. 1. When you're done, click **Submit changes...**.
1. Describe your changes (add a commit message). 1. Describe your changes (add a commit message).
1. Click **Submit changes**. 1. Click **Submit changes**.
1. Click **View merge request** and GitLab will take you there. 1. Click **View merge request** to view it.
Note that support for adding new attributes to the page's front matter from the form is not supported Adding new attributes to the page's front matter from the form is not supported.
yet. You can do so by editing the file locally, through the GitLab regular file editor, or through the Web IDE. Once added, the form will load the new fields. To add new attributes:
- Edit the file locally
- Edit the file with the GitLab regular file editor.
- Edit the file with the Web IDE.
After adding an attribute, the form loads the new fields.
## Configuration files ## Configuration files
...@@ -206,8 +212,8 @@ use to customize behavior of the Static Site Editor (SSE). If the file does not ...@@ -206,8 +212,8 @@ use to customize behavior of the Static Site Editor (SSE). If the file does not
default values which support a default Middleman project configuration are used. 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. 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 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). according to your project's needs. Make sure to respect YAML syntax.
After the table, see an [example of the SSE configuration file](#gitlabstatic-site-editoryml-example). After the table, see an [example of the SSE configuration file](#gitlabstatic-site-editoryml-example).
...@@ -224,8 +230,9 @@ image_upload_path: 'source/images' # Relative path to the project's root. Don't ...@@ -224,8 +230,9 @@ image_upload_path: 'source/images' # Relative path to the project's root. Don't
### Static Site Generator configuration ### Static Site Generator configuration
The Static Site Editor uses Middleman's configuration file, `data/config.yml` 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 to customize the behavior of the project itself. This file also controls the
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). **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).
To [configure the project template to your own project](#set-up-your-project), To [configure the project template to your own project](#set-up-your-project),
you must replace the `<username>` and `<project-name>` in the `data/config.yml` you must replace the `<username>` and `<project-name>` in the `data/config.yml`
...@@ -236,7 +243,7 @@ the Static Site Editor may use different configuration files or approaches. ...@@ -236,7 +243,7 @@ the Static Site Editor may use different configuration files or approaches.
## Using Other Static Site Generators ## Using Other Static Site Generators
Although Middleman is the only Static Site Generator currently officially supported Although Middleman is the only Static Site Generator officially supported
by the Static Site Editor, you can configure your project's build and deployment by the Static Site Editor, you can configure your project's build and deployment
to use a different Static Site Generator. In this case, use the Middleman layout to use a different Static Site Generator. In this case, use the Middleman layout
as an example, and follow a similar approach to properly render an **Edit this page** as an example, and follow a similar approach to properly render an **Edit this page**
......
...@@ -9,16 +9,14 @@ type: index, reference, howto ...@@ -9,16 +9,14 @@ type: index, reference, howto
## Issues and merge requests ## Issues and merge requests
To search through issues and merge requests in multiple projects, you can use the **Issues** or **Merge Requests** links To search through issues and merge requests in multiple projects, use the **Issues** or **Merge Requests** links
in the top-right part of your screen. in the top-right part of your screen. These instructions are valid for both.
Both of them work in the same way, therefore, the following notes are valid for both. The number displayed on their right represents the number of issues and merge requests assigned to you:
The number displayed on their right represents the number of issues and merge requests assigned to you.
![issues and MRs dashboard links](img/dashboard_links.png) ![issues and MRs dashboard links](img/dashboard_links.png)
When you click **Issues**, the opened issues assigned to you are shown straight away: When you click **Issues**, GitLab shows the opened issues assigned to you:
![Issues assigned to you](img/issues_assigned_to_you.png) ![Issues assigned to you](img/issues_assigned_to_you.png)
...@@ -30,7 +28,7 @@ You can also filter the results using the search and filter field, as described ...@@ -30,7 +28,7 @@ You can also filter the results using the search and filter field, as described
### Issues and MRs assigned to you or created by you ### Issues and MRs assigned to you or created by you
GitLab shows shortcuts to issues and merge requests created by you or assigned to you GitLab shows shortcuts to issues and merge requests created by you or assigned to you
on the search field on the top-right of your screen: in the search field in the upper right corner:
![shortcut to your issues and merge requests](img/issues_mrs_shortcut.png) ![shortcut to your issues and merge requests](img/issues_mrs_shortcut.png)
...@@ -156,15 +154,16 @@ using the filter functionality, you can start typing characters to bring up ...@@ -156,15 +154,16 @@ using the filter functionality, you can start typing characters to bring up
relevant users or other attributes. relevant users or other attributes.
For performance optimization, there is a requirement of a minimum of three For performance optimization, there is a requirement of a minimum of three
characters to begin your search. For example, if you want to search for characters to begin your search. To search for issues with the assignee `Simone Presley`,
issues that have the assignee "Simone Presley", you must type at you must type at least `Sim` before autocomplete displays results.
least "Sim" before autocomplete gives any relevant results.
## Search history ## Search history
You can view recent searches by clicking on the little arrow-clock icon, which is to the left of the search input. Click the search entry to run that search again. This feature is available for issues and merge requests. Searches are stored locally in your browser. Search history is available for issues and merge requests, and is stored locally
in your browser. To run a search from history:
![search history](img/search_history.gif) 1. In the top menu, click **Issues** or **Merge requests**.
1. To the left of the search bar, click **Recent searches**, and select a search from the list.
## Removing search filters ## Removing search filters
...@@ -174,7 +173,7 @@ To delete filter tokens one at a time, the <kbd>⌥</kbd> (Mac) / <kbd>Control</ ...@@ -174,7 +173,7 @@ To delete filter tokens one at a time, the <kbd>⌥</kbd> (Mac) / <kbd>Control</
## Filtering with multiple filters of the same type ## Filtering with multiple filters of the same type
Some filters can be added multiple times. These include but are not limited to assignees and labels. When you filter with these multiple filters of the same type, the AND logic is applied. For example, if you were filtering `assignee:@sam assignee:@sarah`, your results include only entries whereby the assignees are assigned to both Sam and Sarah are returned. Some filters can be added multiple times. These include but are not limited to assignees and labels. When you filter with these multiple filters of the same type, the `AND` logic is applied. For example, if you were filtering `assignee:@sam assignee:@sarah`, your results include only entries whereby the assignees are assigned to both Sam and Sarah are returned.
![multiple assignees filtering](img/multiple_assignees.png) ![multiple assignees filtering](img/multiple_assignees.png)
...@@ -192,8 +191,8 @@ You can search through your projects from the left menu, by clicking the menu ba ...@@ -192,8 +191,8 @@ You can search through your projects from the left menu, by clicking the menu ba
On the field **Filter by name**, type the project or group name you want to find, and GitLab On the field **Filter by name**, type the project or group name you want to find, and GitLab
filters them for you as you type. filters them for you as you type.
You can also look for the projects you [starred](../project/index.md#star-a-project) (**Starred projects**), and **Explore** all You can also look for the projects you [starred](../project/index.md#star-a-project) (**Starred projects**).
public and internal projects available in GitLab.com, from which you can filter by visibility, You can **Explore** all public and internal projects available in GitLab.com, from which you can filter by visibility,
through **Trending**, best rated with **Most stars**, or **All** of them. through **Trending**, best rated with **Most stars**, or **All** of them.
You can also sort them by **Name**, **Last created**, **Oldest created**, **Last updated**, You can also sort them by **Name**, **Last created**, **Oldest created**, **Last updated**,
...@@ -217,7 +216,7 @@ and sort them by **Last created**, **Oldest created**, **Last updated**, or **Ol ...@@ -217,7 +216,7 @@ and sort them by **Last created**, **Oldest created**, **Last updated**, or **Ol
From an [Issue Board](../../user/project/issue_board.md), you can filter issues by **Author**, **Assignee**, **Milestone**, and **Labels**. From an [Issue Board](../../user/project/issue_board.md), you can filter issues by **Author**, **Assignee**, **Milestone**, and **Labels**.
You can also filter them by name (issue title), from the field **Filter by name**, which is loaded as you type. You can also filter them by name (issue title), from the field **Filter by name**, which is loaded as you type.
When you want to search for issues to add to lists present in your Issue Board, click To search for issues to add to lists present in your Issue Board, click
the button **Add issues** on the top-right of your screen, opening a modal window from which the button **Add issues** on the top-right of your screen, opening a modal window from which
you can, besides filtering them by **Name**, **Author**, **Assignee**, **Milestone**, you can, besides filtering them by **Name**, **Author**, **Assignee**, **Milestone**,
and **Labels**, select multiple issues to add to a list of your choice: and **Labels**, select multiple issues to add to a list of your choice:
...@@ -226,10 +225,14 @@ and **Labels**, select multiple issues to add to a list of your choice: ...@@ -226,10 +225,14 @@ and **Labels**, select multiple issues to add to a list of your choice:
## Shortcut ## Shortcut
GitLab shows a shortcut on the search field on the top-right of the project's dashboard to To view issues and merge requests created or assigned to you in a project:
quickly access issues and merge requests created or assigned to you in that project:
1. Go to your project.
1. In the top navigation bar, click the search box to display a list of issues and
merge requests.
1. Select your desired issue or merge request:
![search per project - shortcut](img/project_search.png) ![search per project - shortcut](img/project_search.png)
### Autocomplete suggestions ### Autocomplete suggestions
...@@ -246,7 +249,7 @@ You can also type in this search bar to see autocomplete suggestions for: ...@@ -246,7 +249,7 @@ You can also type in this search bar to see autocomplete suggestions for:
## Basic search ## Basic search
The Basic search in GitLab is a global search service that allows you to search The Basic search in GitLab enables you to search
across the entire GitLab instance, in a group, or in a single project. Basic search is across the entire GitLab instance, in a group, or in a single project. Basic search is
backed by the database and allows searching in: backed by the database and allows searching in:
......
...@@ -65,8 +65,8 @@ have version control enabled by default. ...@@ -65,8 +65,8 @@ have version control enabled by default.
This means that all snippets get their own underlying repository initialized with This means that all snippets get their own underlying repository initialized with
a `master` branch at the moment the snippet is created. Whenever a change to the snippet is saved, a a `master` branch at the moment the snippet is created. Whenever a change to the snippet is saved, a
new commit to the master branch is recorded. Commit messages are automatically new commit to the `master` branch is recorded. Commit messages are automatically
generated. The snippet's repository has only one branch (master) by default, deleting generated. The snippet's repository has only one branch (`master`) by default, deleting
it or creating other branches is not supported. it or creating other branches is not supported.
Existing snippets are automatically migrated in 13.0. Their current Existing snippets are automatically migrated in 13.0. Their current
...@@ -75,14 +75,14 @@ content is saved as the initial commit to the snippets' repository. ...@@ -75,14 +75,14 @@ content is saved as the initial commit to the snippets' repository.
### Filenames ### Filenames
Snippets support syntax highlighting based on the filename and Snippets support syntax highlighting based on the filename and
extension provided for them. While it is possible to submit a snippet extension provided for them. While you can submit a snippet
without specifying a filename and extension, it needs a valid name so the without specifying a filename and extension, it needs a valid name so the
content can be created as a file in the snippet's repository. content can be created as a file in the snippet's repository.
In case the user does not attribute a filename and extension to a snippet, If you don't attribute a filename and extension to a snippet,
GitLab automatically adds a filename in the format `snippetfile<x>.txt` GitLab adds a filename in the format `snippetfile<x>.txt`
where `<x>` represents a number added to the file, starting with 1. This where `<x>` represents a number added to the file, starting with 1. This
number increases incrementally when more snippets without an attributed number increments when more snippets without an attributed
filename are added. filename are added.
When upgrading from an earlier version of GitLab to 13.0, existing snippets When upgrading from an earlier version of GitLab to 13.0, existing snippets
...@@ -96,14 +96,15 @@ direct or embedded links to the snippet. ...@@ -96,14 +96,15 @@ direct or embedded links to the snippet.
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2829) in GitLab 13.5. > [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2829) in GitLab 13.5.
GitLab Snippets support multiple files in one single snippet. It can be very handy GitLab Snippets support multiple files in one single snippet. This is helpful
when your code snippet is composed of multiple parts or when they relate when your code snippet is composed of multiple parts or when they relate
to a certain context. For example: to a certain context. For example:
- A snippet that includes a script and its output. - A snippet that includes a script and its output.
- A snippet that includes HTML, CSS, and JS code. - A snippet that includes HTML, CSS, and JS code.
- A snippet with a `docker-compose.yml` file and its associated `.env` file. - A snippet with a `docker-compose.yml` file and its associated `.env` file.
- A `gulpfile.js` file coupled with a `package.json` file, which together can be used to bootstrap a project and manage its dependencies. - A `gulpfile.js` file coupled with a `package.json` file, which together can be
used to bootstrap a project and manage its dependencies.
Snippets support between 1 and 10 files. They can be managed via Git (because they're [versioned](#versioned-snippets) Snippets support between 1 and 10 files. They can be managed via Git (because they're [versioned](#versioned-snippets)
by a Git repository), through the [Snippets API](../api/snippets.md), or in the GitLab UI. by a Git repository), through the [Snippets API](../api/snippets.md), or in the GitLab UI.
...@@ -135,7 +136,7 @@ button above the snippet content to copy the URL of your choice. ...@@ -135,7 +136,7 @@ button above the snippet content to copy the URL of your choice.
This allows you to have a local copy of the snippet's repository and make This allows you to have a local copy of the snippet's repository and make
changes as needed. You can commit those changes and push them to the remote changes as needed. You can commit those changes and push them to the remote
master branch. `master` branch.
### Reduce snippets repository size ### Reduce snippets repository size
...@@ -148,15 +149,15 @@ see the documentation on [reducing repository size](../user/project/repository/r ...@@ -148,15 +149,15 @@ see the documentation on [reducing repository size](../user/project/repository/r
### Limitations ### Limitations
- Binary files are not supported. - Binary files are not supported.
- Creating or deleting branches is not supported. Only a default *master* branch is used. - Creating or deleting branches is not supported. Only a default `master` branch is used.
- Git tags are not supported in snippet repositories. - Git tags are not supported in snippet repositories.
- Snippets' repositories are limited to 10 files. Attempting to push more - Snippets' repositories are limited to 10 files. Attempting to push more
than 10 files results in an error. than 10 files results in an error.
- Revisions are not *yet* visible to the user on the GitLab UI, but - Revisions are not visible to the user on the GitLab UI, but this feature is planned
it's planned to be added in future iterations. See the [revisions tab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/39271) in future iterations. See the [revisions tab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/39271)
for updates. for updates.
- The [maximum size for a snippet](../administration/snippets/index.md#snippets-content-size-limit) - The [maximum size for a snippet](../administration/snippets/index.md#snippets-content-size-limit)
is 50 MB, by default. is 50 MB, by default.
- Git LFS is not supported. - Git LFS is not supported.
## Discover snippets ## Discover snippets
...@@ -168,10 +169,10 @@ dashboard of your GitLab instance via the top navigation. For GitLab.com you can ...@@ -168,10 +169,10 @@ dashboard of your GitLab instance via the top navigation. For GitLab.com you can
navigate to an [overview]((https://gitlab.com/dashboard/snippets)) that shows snippets navigate to an [overview]((https://gitlab.com/dashboard/snippets)) that shows snippets
you created and allows you to explore all snippets. you created and allows you to explore all snippets.
If you want to discover snippets that belong to a specific project, you can navigate To discover snippets that belong to a specific project, navigate
to the Snippets page via the left side navigation on the project page. to the Snippets page via the left side navigation on the project page.
Project snippets are enabled and available by default, but they can Project snippets are enabled and available by default. You can
be disabled by navigating to your project's **Settings**, expanding disable them by navigating to your project's **Settings**, expanding
**Visibility, project features, permissions** and scrolling down to **Visibility, project features, permissions** and scrolling down to
**Snippets**. From there, you can toggle to disable them or select a **Snippets**. From there, you can toggle to disable them or select a
different visibility level from the dropdown menu. different visibility level from the dropdown menu.
...@@ -181,7 +182,7 @@ different visibility level from the dropdown menu. ...@@ -181,7 +182,7 @@ different visibility level from the dropdown menu.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/12910) in GitLab 9.2. > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/12910) in GitLab 9.2.
With GitLab Snippets you engage in a conversation about that piece of code, With GitLab Snippets you engage in a conversation about that piece of code,
facilitating the collaboration among users. encouraging user collaboration.
## Downloading snippets ## Downloading snippets
...@@ -207,20 +208,23 @@ To embed a snippet, first make sure that: ...@@ -207,20 +208,23 @@ To embed a snippet, first make sure that:
- In **Project > Settings > Permissions**, the snippets permissions are - In **Project > Settings > Permissions**, the snippets permissions are
set to **Everyone with access** set to **Everyone with access**
After the above conditions are met, the "Embed" section appears in your After the above conditions are met, the **Embed** section appears in your
snippet where you can simply click on the "Copy" button. This copies a one-line snippet. Click the **Copy** button to copy a one-line
script that you can add to any website or blog post. script that you can add to any website or blog post. For example:
Here's how an example code looks like:
```html ```html
<script src="https://gitlab.com/namespace/project/snippets/SNIPPET_ID.js"></script> <script src="https://gitlab.com/namespace/project/snippets/SNIPPET_ID.js"></script>
``` ```
Here's how an embedded snippet looks like: Here's what an embedded snippet looks like:
<script src="https://gitlab.com/gitlab-org/gitlab-foss/snippets/1717978.js"></script> <script src="https://gitlab.com/gitlab-org/gitlab-foss/snippets/1717978.js"></script>
Embedded snippets are displayed with a header that shows the filename if it's defined, Embedded snippets are displayed with a header that shows:
the snippet size, a link to GitLab, and the actual snippet content. Actions in
the header allow users to see the snippet in raw format and download it. - The filename, if defined.
- The snippet size.
- A link to GitLab.
- The actual snippet content.
Actions in the header enable users to see the snippet in raw format, and download it.
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