Skip to content
Browse files

Clarify docs for static files in collection (#7812)

Merge pull request 7812
  • Loading branch information...
ashmaroli authored and jekyllbot committed Sep 5, 2019
1 parent b8e673b commit b54544c68b96577899b6226593fd1c9f8312ab40
Showing with 19 additions and 3 deletions.
  1. +12 −3 docs/_docs/
  2. +7 −0 docs/_docs/upgrading/
@@ -45,9 +45,12 @@ Create a corresponding folder (e.g. `<source>/_staff_members`) and add
documents. Front matter is processed if the front matter exists, and everything
after the front matter is pushed into the document's `content` attribute. If no front
matter is provided, Jekyll will consider it to be a [static file](/docs/static-files/)
and copy it to the destination (e.g. `_site`) without processing. If front matter
is provided, Jekyll will process the file in your collection but will not write to disk
unless `output: true` is set in the collection's metadata.
and the contents will not undergo further processing. If front matter is provided,
Jekyll will process the file contents into the expected output.
Regardless of whether front matter exists or not, Jekyll will write to the destination
directory (e.g. `_site`) only if `output: true` has been set in the collection's
For example here's how you would add a staff member to the collection set above.
The filename is `./_staff_members/` with the following content:
@@ -60,6 +63,12 @@ position: Developer
Jane has worked on Jekyll for the past *five years*.
Do note that in spite of being considered as a collection internally, the above
doesn't apply to [posts](/docs/posts/). Posts with a valid filename format will be
marked for processing even if they do not contain front matter.
<div class="note info">
<h5>Be sure to name your directories correctly</h5>
@@ -53,6 +53,13 @@ your pages and documents.
The downside to this is that some of the community-authored plugins may not work
as they previously used to.

## Static files in unrendered collections

Collections other than `posts` can contain static assets along with Markdown files.
But if the collection has not been configured with metadata `output: true`, then
neither its *documents* nor its *static assets* will be output to the destination

## For plugin authors

* If your plugin depends on the following code: `site.liquid_renderer.file(path).parse(content)`,

0 comments on commit b54544c

Please sign in to comment.
You can’t perform that action at this time.