Get Started

To create your own story with choose-your-own-csv start with a copy of the Story template on Google Sheets. Alternatively, you use any spreadsheet program starting from the story-template.csv.

Follow the conventions outlined below to develop your narrative in the spreadsheet.

When complete, publish your CSV to the web or add it to your own instance of the choose-your-own-csv template!

Story Spreadsheet Conventions

To create your story you will need to follow a very specific convention in the spreadsheet.

Your spreadsheet must have the columns: id, title, text, and choice_1. Additional “choices” can be added by adding more columns named “choice_” + number, like choice_2,choice_3,choice_4 etc. The typical starter template has the columns like: id,title,text,choice_1,choice_2,choice_3

Each row in the spreadsheet will be one story entry. The entries each become a “story page” featuring a title and body text. If the row has choice columns, those will become “choices” hyperlinked to other story pages.

The column values follow these conventions:

Be especially careful with column names in the first row! They need to exactly follow the template: lowercase, with no spaces, and no extra white space at the end of the value.

Title Row

The first row in the spreadsheet should have the “id” value info, and will contain the story’s title, description, and first page. This information will appear like a cover page for your story. Use the standard columns following these conventions:

Optional Images

Images can be added to your story by adding two additional columns to your spreadsheet, image_link and alt_text. Each “story page” (row) can have one image which will be displayed below the heading.

The image columns follow these conventions:

Publish Your Story CSV

You have three main options for publishing your CSV:

For prototyping, the easiest is Google Sheets.

On the Sheet, ensure your story data is the first sheet tab (by default “Sheet1”). Then go to File > Share > Publish to the Web. On the popup modal, use the dropdowns in “Link” tab to select “Entire Document” and “Comma-separated values (.csv)” options, then click the “Publish” button. Copy the link that is provided.

Your CSV can also be hosted directly in your project—this is the best option for long term access and performance. See “docs/spreadsheet_publish.md” for full details.

Test

To test your work, the default choose-your-own-csv can load any story CSV. Look for the form on the home page and paste in the link to your Story CSV!

Share via URL

To share with others, you can add your CSV link as a parameter in the URL. Add your full CSV link to the end of the choose-your-own-csv instance’s /story/ URL as the “csv” option, like:

https://evanwill.github.io/choose-your-own-csv/story/?csv=<your story url here>

For example:

https://evanwill.github.io/choose-your-own-csv/story/?csv=https://docs.google.com/spreadsheets/d/e/2PACX-1vSUe5ZvNEPQ4wRTYbewm4OMBWIX4u6CAadsTcw-HDDXBgqWnyVvXOlwPrNfex62uRGUZY23Z-WyYwdn/pub?output=csv

or

https://evanwill.github.io/choose-your-own-csv/story/?csv=https://raw.githubusercontent.com/evanwill/choose-your-own-csv/refs/heads/main/public/assets/story-example.csv

Host Your Own

You can create a copy of the choose-your-own-csv project if you would like to host your own instance. Each instance can be configured with a catalog of stories!

Please visit the “docs” folder folder for full details on all these steps.