Understanding how content URLs are generated by Jekyll is critical to preventing build errors. Here's how it works.
- Everything but the experience blog is powered by a Jekyll collection
- Jekyll collections are directories/folders that begin with an underscore: for example
_vre
,_education
, and_playbook
. IMPORTANT: Not every folder in the repo that begins with an underscore is a collection. - Collection URLs are configured by
_config.yml
- Collection paths are based on the Markdown file paths.
- Each Markdown file generates a corresponding directory and
index.html
file. For example:_education/tools-programs.md
→/education/tools-programs/index.html
_education/tools-programs.md
→/education/tools-programs/index.html
_education/work-learn/non-traditional.md
→_education/work-learn/non-traditional/index.html
- Each output directory is also used to create a breadcrumb on that page. For example,
_vre/family/family-members.md
will create a breadcrumb with the following markup:
<ul class="breadcrumbs" role="menubar" aria-label="Primary">
<li class="parent"><a href="/vre/">VR&E</a></li>
<li class="parent"><a href="/vre/family/">Family</a></li>
<li class="active">Family Members</li>
</ul>
And read VR&E > Family > Family Members.
Make sure that every collection sub-directory also has a Markdown file that shares its name. Take the the _employment/job-seekers/
directory as an example. It also has an _employment/job-seekers.md
file. Each Markdown file in _employment/job-seekers/
compiles to employment/jobs-seekers/name_of_markdown_file/index.html
, while _employment/job-seekers.md
itself compiles to employment/job-seekers/index.html
.
Failing to take the above step means that you could generate breadcrumbs to pages that do not exist. This can cause your tests to fail.