Adding a New Page at a Custom URL
This guide will help you add a new page to your site at the URL you specify.
To follow the steps in this tutorial, you should understand how to create a page.
Adding a new page at a custom URL is a two-step process:
Step 1: Create link to new page
Add a link to the previously created
index.liquid page, that links to the About page:
<a href="/about">About</a> Homepage
Sync or deploy. You should see the About link appear on your Homepage.
Step 2: Create new Page
about.liquid page in the
app/views/pages directory. Add a short description ("About"), that shows you this is the About page, and also a link back to the Homepage.
About page <a href="/">Home</a>
Sync or deploy. You should see that the About link on your Homepage now links to the newly created About page. The Home link on your About page links to your Homepage, so you can switch back and forth between the two pages.
Congratulations! You have created a new page at a custom URL. Now you can learn how to inject dynamic content into a layout.