LekoArts / gatsby-themes

Get high-quality and customizable Gatsby themes to quickly bootstrap your website! Choose from many professionally created and impressive designs with a wide variety of features and customization options.
https://themes.lekoarts.de
MIT License
1.87k stars 546 forks source link

Getting a simple navigation in Cara theme #470

Closed mohammedpatla closed 4 years ago

mohammedpatla commented 4 years ago

Summary

In that theme, you use the navbar config in Gatsby.js

// Navigation links
    navigation: [
      {
        title: `Blog`,
        slug: `/blog`,
      },

I wanted to bring that functionality to cara, with simple header links that allow users to jump to a page (from intro to contact us page).

My question is, Is it possible to bring such functionality to Cara Template? If so where do I get started?

PS: Super good looking theme: Using it at https://securesecrets.network

Relevant information

Theme

Cara

Environment (if relevant)

VScode in Windows

File contents (if changed)

gatsby-config.js: N/A package.json: N/A gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

LekoArts commented 4 years ago

Hi, thanks for the issue!

You can put this information into the siteMetadata and then query it via GraphQL: https://www.gatsbyjs.com/docs/gatsby-config/#sitemetadata

Once you have the data you can iterate over the array you get back and create anchor links to different parts of your site.