-
Notifications
You must be signed in to change notification settings - Fork 0
Blocks
Evan Strat edited this page Mar 1, 2018
·
6 revisions
Blocks are quick ways to organize a lot of text-based content.
Use blocks for:
- Content on all pages with two columns
- Some pages with one column
- Content like WiFi passwords, important links, and important phone numbers
Here's an image of a homepage including 3 blocks (Important Information, About, and Phone Numbers):
- Create a file called block_name.md in the _blocks folder
- Add the following frontmatter, and change the variables indicated
---
title: Your Block Title
---
title is the block's header and is displayed in a bigger font above the block.
- Add the content of the block underneath the last
---of the frontmatter. You can use standard Markdown styling to bold or italicize text, add headings, or add code blocks.
- Make or open a file in the
_event_pagesfolder that uses either theone_columnortwo_columnlayout. - Add the following frontmatter variables(s):
Pro-tip: The frontmatter is the part of the file at the very top, located in between two sets of ---
-
For the
one_columnlayout:- Add the following to the frontmatter:
blocks:
- block1.md
- block2.mdNote: The indentation must be correct, or else this won't work. There should be exactly 2 spaces because each -.
-
For the
two_columnlayout:- Add the following to the frontmatter:
left_blocks:
- block1.md
- block2.md
right_blocks:
- block3.mdNote: The indentation must be correct, or else this won't work. There should be exactly 2 spaces because each -.
- You can reuse blocks across the site, or even on the same page
- If you have information you need to put in multiple places, consider using a block
- Within a block, you can use standard Markdown formatting
- There's no minimum or maximum number of blocks you can put on a page, but large numbers of blocks on one page might not look good
Before you begin:
More about:
Finishing up:
