Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 659 Bytes

2019-10-15-adding-menu-items.en.md

File metadata and controls

24 lines (21 loc) · 659 Bytes
title date description category background image
Adding menu items
2019-10-15 15:41:34
Add menu items in GraphQL to create a dynamic menu
Gatsby
#7d4cdb
/assets/img/07.jpg

The menu items translations are located in config/menu and the useMenu custom hook pulls these translations (via GraphQL query) and inserts them into the pages.

Link to Google
Internal link

{
  "menuItems": [
    { "name": "Home", "link": "/" },
    { "name": "About", "link": "/about-me" },
    { "name": "Blog", "link": "/blog" },
    { "name": "Contact", "link": "/contact" }
  ]
}