Adding a page

You can add generic pages that support markdown content but aren’t blog posts. For example, this documentation is written in markdown, consisting of several generic pages.

To add a page, create a new markdown file and put layout: page in a front matter

---layout:pagetitle:Documentation---

Now you can add content as you would in a blog post.

Adding an entry to the sidebar

Hydejack’s sidebar can add links to any page within the site. In order for a page to appear in the sidebar, it needs to have a truthy menu value defined in its front matter. The page also needs to have a title, otherwise the entry in the sidebar will be blank.

If you want the link to appear at a particular position, you can set a numeric value to the order key. However, the page is not guaranteed to appear in a specific position when you set a certain number, as it will only be used to sort the pages. The position of a page also depends on the order of all other pages in the sidebar.

If you don’t want to spread the sidebar definitions across multiple markdown files, you can manage them centrally in your config file using front matter defaults, e.g.:

Creating a new category or tag

Be default, categories and tags are rendered as plain text. Further steps are necessary if you want them to link to a page that contains a list of all posts that belong to that category or tag.

For each featured category or tag, a file called <category-name>.md or <tag-name>.md has to be created inside the _featured_tags and _featured_categories folders, respectively. Each file in these folders is part of a Jekyll Collection.

The meta data of a category or tag is set in the files front matter, e.g.

---# file: _featured_categories/hyde.mdlayout:listtitle:Hydeslug:hydedescription:>Hyde is a brazen two-column [Jekyll](http://jekyllrb.com) theme.It's based on [Poole](http://getpoole.com), the Jekyll butler.---

layout

Must be list

title

Used as title of the page, as well as name of the category or tag as part of the line below a blog post’s title. Can be different from the name of the tag or category, as long as slug is identical to the name.

slug

Must be identical to the key used in the blog’s front matter, i.e. if you use categories: [jekyll] the slug must be jekyll. By default, the slug is derived from the title, but here it is recommended that you set it explicitly.

description

A medium-length description, used on the tag or category’s detail page and shown in a message box below the title.

Once the file is created, the page can be found at /category/<categoryname>/ or /tag/<tagname>/.

Adding an about page

About pages are a frequent use case, so Hydejack has a special layout for it. It is a slight modification of the page layout that allows showing the author information by adding the <!--author--> marker somewhere on the page.

To create an about page, make sure layout is set to about. For more on authors, see Adding an author.

---# file: about.mdlayout:abouttitle:About---

Adding a cover page

Hydejack 8 introduces cover pages, i.e. pages witht he sidebar opened, so that it spans the entire screen. This feature is intended for landing pages. To enable it on a page, simply add cover: true to the front matter.

Customization

Adding custom CSS

The quickest and safest way to add custom CSS to Hydejack is via the _sass/my-inline.scss and _sass/my-style.scss files (create the folder/the files if they don’t exist).

To add CSS that gets inlined into the page, i.e. is loaded with the first request, put the CSS rules into my-inline.scss. This is intended for above-the-fold content. Otherwise put the CSS rules into my-style.scss. Note that this distinction has no effect when no_inline_css is enabled.

Adding custom HTML to the head

To add custom HTML elements to the <head> of the document, open _includes/my-head.html (create the folder/the files if they don’t exist) and add your elements there.

Adding custom HTML to the body

To add custom HTML elements to the <body> of the document, open _includes/my-body.html (create the folder/the files if they don’t exist) and add your elements there.

What’s the difference to my-scripts.html?

This file was used in earlier versions of Hydejack to accomplish the same goal. However, there are still instances were you might want to prefer my-scripts.html over my-body.html, as it won’t load scrips on redirect pages and will be ignored by browsers < IE10.

Adding a welcome page*

If you bought the PRO version of Hydejack you have access to the welcome layout. It is intended to showcase your projects and blog posts in a compact way. Technically, it is a modified version of the about layout, so it allows showing the author information where the <!--author--> marker is put. Demo.

You can create a welcome page by creating a new markdown file and setting the layout to welcome in the front matter.

---# file: index.mdlayout:welcometitle:Welcomecover:true---

Without further configuration, the welcome page will just look like a regular page. To show the two most recent projects, add the <!--projects--> marker to the content. To show the five most recent blog posts, add the <!--posts--> marker to the content.

The welcome layout also supports selecting specific projects and posts, by adding to the front matter, e.g.:

A list of paths to project files that should be displayed below the main content of the page. The paths are relative to the main directory with no leading ./. If no paths are provided, the two most recent projects will be used.

more_projects

The path to the main projects page. The path is relative to the main directory with no leading ./.

selected_projects

A list of paths to blog posts that should be featured on the welcome page. The paths are relative to the main directory with no leading ./. If no paths are provided, the five most recent posts will be used.

more_posts

The path to the main posts page. The path is relative to the main directory with no leading ./.

featured

Optional. When true, project thumbnails will span the full width instead of half. This setting takes precedence over the featured value of individual projects, i.e. it will apply to the entire page.

Adding a projects page*

The projects page will show all projects in a particular collection. First, you need to make sure that you have the projects collection defined in _config.yml:

Next, add a projects.md to in the root (you can adjust the name/location to match the the permalink of the collection). This file has the projects layout (mind the “s” at the end) and should have a show_collection key, with the name of the collection as a value, e.g.:

The title of the page. Note that this name is reused as part of each individual project page (for the link that directs back to the projects page).

show_collection

The name of the collection you want display on this page. Defaults to projects.

featured

Optional. When true, project thumbnails will span the full width, instead of only half. This setting takes precedence over the featured value of individual projects, i.e. it will apply to the entire page.

Adding a project*

Projects are organized using Jekyll Collections. Each project generates an entry on the projects layout (Demo) as well as its own detail page (Demo).

Each project is defined by a file in the _projects directory. The project’s meta information is defined in the file’s front matter. You can also add markdown content. A project’s front matter should look like:

Providing a year is the minimum requirement. Used to sort the projects.

screenshot

A 16:9 screenshot of the project.

You can pass an URL to an image, but it is recommended that you provide a src-srcset pair (see example above).

Hydejack will show the screenshot in various sizes, depending on the screen width, so that no specific size will fit all. Instead, it is recommended that you use a mipmap-like approach, providing the image in multiple sizes, each image half the width of the previous one. The src key is a fallback image for browsers that don’t support the srcset attribute. The keys of the srcset hash will be used as descriptors.

A short description, shown as part of each “project card” in the projects layout.

description

A medium-length description, used on the project’s detail page as meta description and shown as message box below the screenshot.

links

A list of title-url pairs that link to external resources related to this project.

author

Optional. The author shown below the project, similar to posts.

featured

Optional. When true, the project preview will span the full content width. You can use this for projects that should receive more attention. You can set/override this for an entire page, by setting featured in the front matter (applies to the projects and welcome layout).