Frontity Tutorial
  • 👋Welcome
  • ✔️Checking your progress
  • 1️⃣ Creating a custom theme
    • Create a Frontity Project
    • Create a Theme Package
    • Modify the <Root> component
    • Connect the <Root> component to the state
  • 2️⃣ Adding a menu
    • Use the <Link> component
  • 3️⃣ Displaying posts
    • Understanding the Frontity state
    • Display the list of posts
    • Display the post content
    • Display posts and pages separately
    • Formatting the date
  • 4️⃣ Adding styling
    • Global styles
    • Styled components
    • Styling the links
    • Styling the post info
    • Add dynamic styling
  • 5️⃣ Adding behaviour
    • Use 'state' and 'actions'
    • Add pagination
  • 6️⃣ Custom Post Types
    • Add support for Custom Post Types
  • 7️⃣ Finishing touches
    • Add a <Loading> component
    • Add a 404 page
    • Use the <html2react> component
    • SEO and head tags
    • Other things to do
  • 8️⃣ Deploying the project
    • Deploy to Vercel
  • 9️⃣ Next Steps
    • Learning resources
    • Getting help and support
    • Contributing to Frontity
Powered by GitBook
On this page

2️⃣ Adding a menu

We've now got the beginnings of our project up and running and we've created the directory structure that we're going to work in going forward.

We've also seen how we can change the value stored in state.router.link by manually changing the URL in the browser's address bar.

In this second section we will create a basic menu consisting of a series of links that ultimately will enable us to navigate around our site, but for now will change the URL (and hence the value stored in state.router.link) for us.

To do so we will learn about and use one of the built-in components that Frontity provides, i.e. the <Link> component.

PreviousConnect the <Root> component to the stateNextUse the <Link> component

Last updated 4 years ago