Skip to content

About Blog Posts

Posted by author in the category "demo"

Now we get to the fun part!

Hyde makes making blog posts easy. The blogging module is especially helpful for tech writers who love working with Markdown.

Front Matter & Creating blog posts

As you can see on the top of this file there is a block of YAML called Front Matter. This is where you can put all the metadata that you want to associate with your blog post.

To quickly create blog posts, you can use the php hyde make:post command to scaffold a new Markdown file. An interactive prompt will fill in all the front matter for you!

Like all other page types, you don't have to use front matter if you don't want to. You can just write your blog post in plain Markdown. However, for blog posts we recommend it as it allows you to specify metadata like the title, description, and category, all of which improve presentation and searchability.

Referencing images

It's very easy to use images in blog posts using traditional Markdown syntax

Usually, you'll use a path to the image, relative to the _site directory. For example, since this is a blog post, we want to place ../media/ before the image file name. If you were doing this in a markdown page, you can just use media/. Of course you can always supply a full URI, if you for example want to load an image from a CDN.

Image Alt Text

Syntax highlighting

Pro tip: Hyde comes with built-in support for Torchlight.dev syntax highlighting.

'features' => [
Features::blogPosts(),
Features::bladePages(),
Features::markdownPages(),
// Features::documentationPages(),
],
End of article