Skip to content
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): Example home page included a few blocks

How to make a block

  1. Create a file called block_name.md in the _blocks folder
  2. 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.

  1. 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.

Adding blocks to a page

  1. Make or open a file in the _event_pages folder that uses either the one_column or two_column layout.
  2. 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_column layout:
    • Add the following to the frontmatter:
blocks:
  - block1.md
  - block2.md

Note: The indentation must be correct, or else this won't work. There should be exactly 2 spaces because each -.

  • For the two_column layout:
    • Add the following to the frontmatter:
left_blocks:
  - block1.md
  - block2.md
right_blocks:
  - block3.md

Note: The indentation must be correct, or else this won't work. There should be exactly 2 spaces because each -.

Tips and considerations

  • 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

Clone this wiki locally