If you would like to update content or other resources on Extension Workshop, please:
- Make a fork of this repository.
- Clone your fork locally.
- Create a new branch to contain your change. Give your branch a descriptive name, such as update-distribution-options, or add-object-fit-example.
- Make your change. Please be sure to add your Github username to the lists for 'contributors' and 'last updated by', as well as the date of your update, for each file you change.
- Commit your change.
- Push the branch to your remote fork.
- Make a pull request to the original repo.
If you are not sure how to complete the above steps, GitHub's [Fork a Repo guide](https://help.github.com/en/articles/fork-a-repo#fork-an-example-repository) is a good place to start.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Note: Running locally will show unpublished content that uses the `published: false` convention in frontmatter. Content with `published: false` will not be available on stage or production.
This tag will output an entire `img` element. Note: that using `@optim` enables the jekyll asset pipeline to optimize the image. This is always recommended unless you see an issue with the output.
2. Add a node with appropriate attributes, in the appropriate location, for the new page. See below for [details on how to understand the pages.yaml structure](#understanding-the-pagesyaml-structure).
3. Create a new page, nested inside a folder struture that matches the url path. For example, for permalink `/documentation/develop/best-practices-for-collecting-user-data-consents/`, you would create a file called `best-practices-for-collecting-user-data-consents.md` and place it in `documentation` > `develop`.
4. For reference on how to create a page, review the `sidebar-master-template.md` file, which lists all available modules. Some notes:
-`published: false` will withhold this content from stage and production, to publish content, remove this line.
-`skip_index: true` is used for pages that shouldn't be indexed for search results.
- When creating page sections that will be listed in the table of contents, add an ID attribute to the section container that matches the subpageitem added to Pages.yaml. If your layout requires several sections for one table of contents entry, nest your sections inside a containing element which has the ID attribute.
- Rull for creating section IDs: use the `h2` title of the section, converted to lowercase, spaces replaced with dashes, all non-alphanumeric characters removed. For example, the section `h2` title "Know your privacy settings" would be converted to `know-your-privacy-settings` for the section ID
- The first section following the "Page Hero" module should be the "Table of Contents" module: `modules/column-w-toc.html`.
<h4id="understanding-the-pagesyaml-structure">Understanding the Pages.yaml structure</h4>
- Each node is started with a `-`
- Sub nodes are indented below parent nodes
- Each new page has a title and url attribute _**Note:** The url attribute must match exactly the permalink attribute of the page's front matter (including leading and trailing slashes)_
- Attributes are indented on new lines
- Pages can also have a subpageitems node for sections within the page to be referenced in the table of contents for that page:
- Each subpageitem node has a title and ID attribute, where the ID matches the ID attribute of the section container _(IDs need to be added to a containing element, rather than the heading element, of the section. This is so that highlighting for that section stays active even when the section title is out of view)_
- Overview pages have category nodes for each of the sub categories for that section
- Categories have a category attibute which denotes the category title, and a pages attribute where sub pages of the overview page are listed
- The Documentation Topics section pages are nested inside a `subfolderitems` node, which creates the dropdown panel
If you don't want the page to be labelled as a draft, as and when it's ready remove `draft-label: true` from the relevant entry in `_data/content-guidelines.yaml`