https://app.netlify.com/sites/SITE_NAME/deploys/DEPLOY_ID#L5-L10
www.yourcustomdomain.com
and yoursitename.netlify.app
.
staging
, it will deploy to staging--yoursitename.netlify.app
. If you use Netlify DNS, you
can enable branch subdomains, so
the staging
branch example would deploy to staging.yourcustomdomain.com
.
deploy-preview
followed by the identifier
number of the pull request or
merge request. For example, a
Deploy Preview for pull/merge
request #42 will deploy to deploy-preview-42--yoursitename.netlify.app
. For more information, visit
the docs on
Deploy Previews.
1234abcd12acde000111cdef--yoursitename.netlify.app
. The web content at this URL
never changes. This is in
contrast to production deploys,
branch deploys, and Deploy
Previews where the web content
is updated when you merge or
push new commits.
X-Robots-Tag: noindex
header included in the response.
Depending on how you use branch deploys,
you may want to prevent even your most
recent branch deploys from being indexed
by search engines. You can do so by
configuring
custom headers
in your branch.
production
: this context corresponds to
the main site’s deployment,
attached to the Git branch you
set when the site is
created.
deploy-preview
: this context corresponds to
the previews we build for
pull/merge requests.
branch-deploy
: this context corresponds to
deploys from branches that are
not the site’s main production
branch.
staging
will match a deploy context called staging
.
netlify.toml
in the root of your Git repository.
There, you can set as many contexts as
you want to configure.
netlify.toml
file, settings for more specific
contexts will override more general
ones. For example, settings for a
specific branch will override those for
branch-deploy.
https://www.netlify.com/img/deploy/button.svg
.
https://app.netlify.com/start/deploy
. This link requires the public
Git repository as a parameter,
for example:
netlify.toml
file in the root of the repository, if
you don’t have it already. We’ll read
the information from there. This file
can also be used to set options for
continuous deployment, you can read more
about it in the
file-based configuration
documentation.
[template]
section in that file, you can set two
directives:
SECRET_TOKEN
and CUSTOM_LOGO
, the resulting URL will be something
like this:
deploy-preview
followed by the identifier number of the
pull request or merge request. For
example, a Deploy Preview for pull/merge
request #42 will deploy to deploy-preview-42--yoursitename.netlify.app
. The web content of this URL is
updated every time changes are pushed to
the associated pull/merge request.
1234abcd12acde000111cdef--yoursitename.netlify.app
. The contents of this URL never
change, even after you redeploy your
site.
deploy-preview
prefixed URLs.
body
tags.
@netlify /path/to/page
in the initial description of
your GitHub pull request or
GitLab merge request.
/
.
default-src
script-src
frame-src
child-src
app.netlify.com
and netlify-cdp-loader.netlify.app
to the allow list in the _headers
or netlify.toml
file. For example:
Netlify
and using the Netlify logo as
the avatar to help associate
unauthenticated comments with
Netlify.
<head>
or at the end of the <body>
tag.
</head>
tag or before the closing </body>
tag.
password
protection screen. This means you can
verify that your analytics scripts are
correctly configured without having to
remove the password when your site is
still under development.
<script>
tags, etc).
BETA
.
_escaped_fragment_
query parameter in the request, and the
origin server can then choose to return
a document that represents the content a
user will actually get when the single
page app is running.
config.yml
file, in the folder where you access the
editor UI (usually in the /admin
folder).
backend
option specifies how to access the
content for your site, including
authentication. Full details and code
samples can be found in
Backends.
publish_mode
option allows you to enable
"Editorial Workflow" mode for
more control over the content publishing
phases. All unpublished entries will be
arranged in a board according to their
status, and they can be further reviewed
and edited before going live.
config.yml
file:
cms/collectionName/entrySlug
), and opens a pull
request
media_folder
option specifies the folder path where
uploaded files should be saved, relative
to the base of the repo.
public_folder
option specifies the folder path where
the files uploaded by the media library
will be accessed, relative to the base
of the built site. For fields controlled
by [file] or [image] widgets, the value
of the field is generated by prepending
this path to the filename of the
selected file. Defaults to the value of media_folder
, with an opening /
if one is not already included.
avatar
to upload and select an image called philosoraptor.png
, the image would be saved to the
repository at /static/images/uploads/philosoraptor.png
, and the avatar
field for the file would be set to /images/uploads/philosoraptor.png
.
https://netlify.com/media
should you wish, however in general this
is not advisable as content should have
relative paths to other content.
media_library
property, and its value should be an
object with at least a name
property. A config
property can also be used for options
that should be passed to the library in
use.
site_url
setting should provide a URL to your
published site. May be used by the CMS
for various functionality. Used together
with a collection's preview_path
to create links to live content.
display_url
setting is specified, the CMS UI will
include a link in the fixed area at the
top of the page, allowing content
authors to easily return to your main
site. The text of the link consists of
the URL without the protocol portion
(e.g., your-site.com
).
site_url
.
logo_url
setting is specified, the CMS UI will
change the logo displayed at the top of
the login page, allowing you to brand
the CMS with your own logo. logo_url
is assumed to be a URL to an image
file.
en
.
config.yml
:
When importingnetlify-cms
all locales are registered by default (so you only need to update yourconfig.yml
).
search
property to false
.
true
slug
option allows you to change how
filenames for entries are created and
sanitized. It also applies to filenames
of media inserted via the default media
library. For modifying the actual data
in a slug, see the per-collection option
below.
slug
accepts multiple options:
encoding
unicode
(default): Sanitize
filenames (slugs)
according to
RFC3987
and the
WHATWG URL
spec. This spec allows
non-ASCII (or non-Latin)
characters to exist in
URLs.
ascii
: Sanitize filenames
(slugs) according to
RFC3986. The only allowed
characters are (0-9,
a-z, A-Z, _
, -
, ~
).
clean_accents
: Set to true
to remove diacritics from slug
characters before sanitizing.
This is often helpful when using ascii
encoding.
sanitize_replacement
: The replacement string used
to substitute unsafe characters,
defaults to -
.
collections
setting is the heart of your Netlify CMS
configuration, as it determines how
content types and editor fields in the
UI generate files and content in your
repository. Each collection you
configure displays in the left sidebar
of the Content page of the editor UI, in
the order they are entered into your
Netlify CMS config.yml
file.
collections
accepts a list of collection objects,
each with the following options:
name
(required): unique identifier
for the collection, used as the
key when referenced in other
contexts (like the
relation widget)
identifier_field
: see detailed description
below
label
: label for the collection in
the editor UI; defaults to the
value of name
label_singular
: singular label for certain
elements in the editor; defaults
to the value of label
description
: optional text, displayed
below the label when viewing a
collection
files
or folder
(requires one of these):
specifies the collection type
and location; details in
Collection Types
create
: for folder
collections only; true
allows users to create new items
in the collection; defaults to false
publish
: for publish_mode:
editorial_workflow
only; false
hides UI publishing controls for
a collection; defaults to true
hide
: true
hides a collection in the CMS
UI; defaults to false
. Useful when using the
relation widget to hide
referenced collections.
delete
: false
prevents users from deleting
items in a collection; defaults
to true
extension
: see detailed description
below
format
: see detailed description
below
frontmatter_delimiter
: see detailed description
under format
slug
: see detailed description
below
preview_path
: see detailed description
below
preview_path_date_field
: see detailed description
below
fields
(required): see detailed
description below
editor
: see detailed description
below
summary
: see detailed description
below
sortable_fields
: see detailed description
below
view_filters
: see detailed description
below
view_groups
: see detailed description
below
identifier_field
"title"
that serves as an identifier for the
entry. The identifier field serves as an
entry's title when viewing a list
of entries, and is used in
slug
creation. If you would like to use a
field other than "title"
as the identifier, you can set identifier_field
to the name of the other field.
extension
and format
extension
determines the file extension searched
for when finding existing entries in a
folder collection and it determines the
file extension used to save new
collection items. It accepts the
following values: yml
, yaml
, toml
, json
, md
, markdown
, html
.
extension
not included in the list above, as long
as the collection files can be parsed
and saved in one of the supported
formats below.
format
determines how collection files are
parsed and saved. It will be inferred if
the extension
field or existing collection file
extensions match one of the supported
extensions above. It accepts the
following values:
yml
or yaml
: parses and saves files as
YAML-formatted data files; saves
with yml
extension by default
toml
: parses and saves files as
TOML-formatted data files; saves
with toml
extension by default
json
: parses and saves files as
JSON-formatted data files; saves
with json
extension by default
frontmatter
: parses files and saves files
with data frontmatter followed
by an unparsed body text (edited
using a body
field); saves with md
extension by default; default
for collections that can't
be inferred. Collections with frontmatter
format (either inferred or
explicitly set) can parse files
with frontmatter in YAML, TOML,
or JSON format. However, they
will be saved with YAML
frontmatter.
yaml-frontmatter
: same as the frontmatter
format above, except frontmatter
will be both parsed and saved
only as YAML, followed by
unparsed body text. The default
delimiter for this option is ---
.
toml-frontmatter
: same as the frontmatter
format above, except frontmatter
will be both parsed and saved
only as TOML, followed by
unparsed body text. The default
delimiter for this option is +++
.
json-frontmatter
: same as the frontmatter
format above, except frontmatter
will be both parsed and saved as
JSON, followed by unparsed body
text. The default delimiter for
this option is {
}
.
frontmatter_delimiter
~~~
. If you need different beginning and
ending delimiters, you can use an array
like ["(", ")"]
.
slug
slug
option specifies a template for
generating new filenames based on a
file's creation date and title
field. (This means that all collections
with create: true
must have a title
field (a different field can be used via
identifier_field
).
{{title}}
. If a field name conflicts with a
built in template tag name - for
example, if you have a field named slug
, and would like to reference that
field via {{slug}}
, you can do so by adding the explicit fields.
prefix, eg. {{fields.slug}}
.
{{author}}
{{slug}}
: a url-safe version of the title
field (or identifier field) for
the file
{{year}}
: 4-digit year of the file
creation date
{{month}}
: 2-digit month of the file
creation date
{{day}}
: 2-digit day of the month of
the file creation date
{{hour}}
: 2-digit hour of the file
creation date
{{minute}}
: 2-digit minute of the file
creation date
{{second}}
: 2-digit second of the file
creation date
preview_path
{{slug}}
is the entire slug for the
current entry (not just the
url-safe identifier, as is the
case with
slug
configuration)
{{year}}
and {{month}}
, are pulled from a date field
in your entry, and may require
additional configuration - see
preview_path_date_field
for details. If a date template
tag is used and no date can be
found, preview_path
will be ignored.
{{dirname}}
The path to the file's
parent directory, relative to
the collection's folder
.
{{filename}}
The file name without the
extension part.
{{extension}}
The file extension.
preview_path_date_field
preview_path
. If this field is not provided and preview_path
contains date-based template tags (eg. {{year}}
), Netlify CMS will attempt to infer a
usable date field by checking for common
date field names, such as date
. If you find that you need to specify
a date field, you can use preview_path_date_field
to tell Netlify CMS which field to use
for preview path template tags.
fields
fields
option maps editor UI widgets to
field-value pairs in the saved file. The
order of the fields in your Netlify CMS config.yml
file determines their order in the
editor UI and in the saved file.
fields
accepts a list of collection objects,
each with the following options:
name
(required): unique identifier
for the field, used as the key
when referenced in other
contexts (like the
relation widget)
label
: label for the field in the
editor UI; defaults to the value
of name
default
: specify a default value for a
field; available for most widget
types (see
Widgets
for details on each widget
type). Please note that field
default value only works for
folder collection type.
required
: specify as false
to make a field optional;
defaults to true
pattern
: add field validation by
specifying a list with a regex
pattern and an error message;
more extensive validation can be
achieved with
custom widgets
comment
: optional comment to add
before the field (only supported
for yaml
)
body
. This special field represents the
section of the document (usually
markdown) that comes after the
frontmatter.
editor
preview
: set to false
to disable the preview pane for
this collection or file;
defaults to true
summary
slug
field, a string with templates can be
used to include values of different
fields, e.g. {{title}}
. This option over-rides the default of title
field and identifier_field
.
{{dirname}}
The path to the file's
parent directory, relative to
the collection's folder
.
{{filename}}
The file name without the
extension part.
{{extension}}
The file extension.
{{commit_date}}
The file commit date on
supported backends (git based
backends).
{{commit_author}}
The file author date on
supported backends (git based
backends).
sortable_fields
title
, date
, author
and description
fields and will also show Update On
sort field in git based backends.
author
field can't be inferred commit
author will be used.
view_filters
view_groups