--- title: Pages tags: [getting_started, formatting, content_types] keywords: pages, authoring, exclusion, frontmatter last_updated: July 3, 2016 summary: "This theme primarily uses pages. You need to make sure your pages have the appropriate frontmatter. One frontmatter tag your users might find helpful is the summary tag. This functions similar in purpose to the shortdesc element in DITA." sidebar: mydoc_sidebar permalink: mydoc_pages folder: mydoc --- ## Where to author content Use a text editor such as Sublime Text, WebStorm, IntelliJ, or Atom to create pages. Atom is recommended because it's created by Github, which is driving some of the Jekyll development through Github Pages. ## Page names and excluding files from outputs By default, everything in your project is included in the output. You can exclude all files that don't belong to that project by specifying the file name, the folder name, or by using wildcards in your configuration file: ```yaml exclude: - filename.md - subfolder_name/ - mydoc_* - gitignore ``` Wildcards will exclude every match after the `*`. ## Frontmatter Make sure each page has frontmatter at the top like this: ```yaml --- title: Alerts tags: [formatting] keywords: notes, tips, cautions, warnings, admonitions last_updated: July 3, 2016 summary: "You can insert notes, tips, warnings, and important alerts in your content." sidebar: mydoc_sidebar permalink: mydoc_alerts --- Frontmatter is always formatted with three hyphens at the top and bottom. Your frontmatter must have a `title` and `permalink` value. All the other values are optional. Note that you cannot use variables in frontmatter. The following table describes each of the frontmatter that you can use with this theme: | Frontmatter | Required? | Description | |-------------|-------------|-------------| | **title** | Required | The title for the page | | **tags** | Optional | Tags for the page. Make all tags single words, with underscores if needed (rather than spaces). Separate them with commas. Enclose the whole list within brackets. Also, note that tags must be added to \_data/tags_doc.yml to be allowed entrance into the page. This prevents tags from becoming somewhat random and unstructured. You must create a tag page for each one of your tags following the pattern shown in the tags folder. (Tag pages aren't automatically created.) | | **keywords** | Optional | Synonyms and other keywords for the page. This information gets stuffed into the page's metadata to increase SEO. The user won't see the keywords, but if you search for one of the keywords, it will be picked up by the search engine. | | **last_updated** | Optional | The date the page was last updated. This information could helpful for readers trying to evaluate how current and authoritative information is. If included, the last_updated date appears in the footer of the page in rather small font.| | **summary** | Optional | A 1-2 word sentence summarizing the content on the page. This gets formatted into the summary section in the page layout. Adding summaries is a key way to make your content more scannable by users (check out [Jakob Nielsen's site](http://www.nngroup.com/articles/corporate-blogs-front-page-structure/) for a great example of page summaries.) The only drawback with summaries is that you can't use variables in them. | | **permalink**| Required | Make the permalink match the file name for the sake of simplicity. You specify the permalink you want for the page, and the \_site output will put the page into the root directory when you publish. Permalink names don't have to match your file names, but it might be easier to keep them in sync. If you don't use permalinks, Jekyll automatically uses the file name and folder path as the link.| | **datatable** | Optional | 'true'. If you add `datatable: true` in the frontmatter, scripts for the [jQuery Datatables plugin](https://www.datatables.net/) get included on the page. You can see the scripts that conditionally appear by looking in the \_layouts/default.html page. | | toc | Optional | If you specify `toc: false` in the frontmatter, the page won't have the table of contents that appears below the title. The toc refers to the list of jump links below the page title, not the sidebar navigation. You probably want to hide the TOC on the homepage and product landing pages.| ## Colons in page titles If you want to use a colon in your page title, you must enclose the title's value in quotation marks. ## Saving pages as drafts If you add `published: false` in the frontmatter, your page won't be published. You can also move draft pages into the \_drafts folder to exclude them from the build. With posts, you can also keep them as drafts by omitting the date in the title. ## Markdown or HTML format Pages can be either Markdown or HTML format (specified through either an .md or .html file extension). If you use Markdown, you can also include HTML formatting where needed. But if you're format is HTML, you must add a `markdown="1"` attribute to the element: ```