Create new page portum theme
Here is an example of how you can create a new page in the Portum theme:
Step 1: Create a new file
In your Portum theme directory, create a new file called new-page.md
(or any other name you prefer, but make sure it ends with .md
).
Step 2: Add the page metadata
In the new file, add the following metadata at the top:
---
title: New Page
layout: page
---
This tells Portum that this file is a page and sets the title to "New Page".
Step 3: Add the page content
Below the metadata, add the content of your new page. You can use Markdown syntax to format your text. For example:
# New Page
This is a new page in the Portum theme. You can add any content you like here, including headings, paragraphs, images, and more.
## Subheading
This is a subheading on the new page.
Step 4: Add the page to the menu
To add the new page to the menu, you need to update the menu.yml
file in your Portum theme directory. Open the file and add the following line:
- title: New Page
url: /new-page
This adds a new menu item called "New Page" with a URL of /new-page
.
Step 5: Update the theme
After adding the new page and menu item, you need to update the theme by running the following command in your terminal:
bundle exec jekyll build
This rebuilds the theme and makes the new page available.
Step 6: View the new page
Finally, you can view the new page by navigating to http://localhost:4000/new-page
in your web browser (assuming you're running the theme locally).
That's it! You've created a new page in the Portum theme.