AnVIL Portal
  • Creating Content
  • Editing an Existing Page
  • Creating a New Page
  • Using Images
  • Adding YouTube Videos
  • Creating Links
  • Creating Events
  • Creating News Items
  • Adding a New Publication

Creating a New Page

To create a new page, we need to:

  1. Add a new markdown (.md) file for the new page.
  2. Add a "front matter" metadata section to the new markdown file.
  3. Add the page content as markdown.
  4. Add the page to the siteMap.js file.

Adding the new .md File.

You can create the new .md file using the GitHub interface. Fist navigate to the parent directory and then use the Create New File button as shown below.

Typically the folder structure mirrors the structure or the site. This is not strictly necessary as the URL to a page is defined by the site map and not the folder structures. However, it does make pages much easier to find when they need to be updated.

Create File
Figure 1: Using the github interface to create a new page.
Create Folder
Figure 2: Using the github interface to create a new folder.

Create the "Front Matter"

Metadata describing the page and indicating its publication date, and author are held in the pages "Front Matter". Front matter is a YAML section that lists key values pairs of configuration for the page in the very beginning or "front" of the file.

   ---
   date: "2018-05-30"
   Author: "Susan Smith"
   ---

Add the Page Content

With the front matter created, it is time to add the page content in markdown. See one of the many markdown guides on the internet.

Add the page URL to the siteMap.js

To get your page added to the siteMap and deployed, please open a pull request for your new page in the Github Project for the AnVIL portal repository.


Help us make these docs great!
All AnVIL docs are open source. See something that’s wrong or unclear? Submit a pull request.
Make a contribution