Skip to content

How to create your own ballot website

Ryan Johnson edited this page May 12, 2020 · 10 revisions

This page will describe how to update a fork of this repository to create your own ballot website for you state.

  1. Clone the repository. Don't know how? Learn how to clone a repository.
  2. Set the date of the current election. The "current election" post list on the homepage doesn't generate from the categories, as does the previous elections list. It generates from the current_election key in the _data folder. You need to keep that up to date in order to generate posts with the same date. And those posts need to have the properly formatted front matter date (e.g., 2018-11-06).
  3. Create posts for each election question by copying one of the posts in the Maine Ballot site.
  • Name each post using the following format:
    • [election date]-[question number]_[short title].md
    • For example: 2018-11-06-Q1_HomeCare.md
  • The following items live in the front matter:
    • Title: Title that will display in the list of questions
    • Excerpt: Short description that will display in the list of questions
    • Election: Election date in this format: 2018-11-06
    • Header: Contains the elements for the image. Put all your images in the assets/img folder. You can create folders for each election, if you find that helpful.
      • overlay_image: Will be used as the hero image on the question page
      • teaser: Will be used as a thumbnail on the homepage
      • overlay_filter: Defines level of opacity on the hero image
    • Categories: Used for the election date to tie questions into elections on the Archive page
    • Tags: Use to tie questions together when you click on one of the tags at the bottom of a question page
    • yes_vote: Description of what yes means to go in the Yes Means/No Means table (an include)
    • no_vote: Description of what no means to go in the Yes Means/No Means table (an include)
    • Last modified date: Displays as the modification date
  • The category is used for the election date to tie questions into election on the Archive page.
  • Tags are used to tie questions together when you click on one of the tags.
  • The remaining sections are filled out within the page body.
    • The results: Only needed for elections that are complete
    • The gist: Short description
    • Ballot question: Full text of the ballot question
    • Yes Means/No Means: Include that pulls content from the front matter (markdown file must include {% include yes-no-table.html %} and the front matter must include the keys described above)
    • Tell me more: More details about the question
    • Follow the money: Details about the money being brought in or spent for the measure. Includes sections for where the money is coming from and going to when it makes sense.
    • Pros: Arguments for the measure
    • Cons: Arguments against the measure
    • Further reading: Links to articles and such about the measure
    • Image credit: If the image requires attribution, include this section to give credit
    • References: List of references. Start each reference with [^1]: and put links in the content above as [^1] to create hyperlinked footnotes.

Review our documentation on content management for local elections.

When you're done, send us an email at [email protected] and we'll add a link to your site!