The header menu of How To Code Well which is shared across multiple sites
$ npm install --save @howtocodewell/header-menu
$ npm run build
- Create the following config file in
<project_root>/src/config/headerMenu.json
and changename
andurl
values.
{
"items": [
{
"name": "Overriden",
"url": "https://howtocodewell.net/merch"
},
{
"name": "Courses",
"url": "https://howtocodewell.net/shop"
},
{
"name": "Tutorials",
"url": "https://howtocodewell.net/courses"
},
{
"name": "Orders",
"url": "https://codechallenges.howtocodewell.net"
}
]
}
- Import the module and config
import HeaderMenu from "@howtocodewell/header-menu"
import menu from "./config/headerMenu.json"
- Load the
HeaderMenu
and pass the menu property
<HeaderMenu menu={menu} />