Skip to content

Commit

Permalink
Merge remote-tracking branch 'documentation/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
khadni committed Oct 18, 2024
2 parents 1883739 + 2d540df commit a178c26
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 49 deletions.
4 changes: 4 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { RehypePlugins } from "@astrojs/markdown-remark"
// https://astro.build/config
export default defineConfig({
site: "https://docs.chain.link",
redirects: {
"/getting-started": "/getting-started/conceptual-overview",
"/resources": "/resources/link-token-contracts",
},
integrations: [
preact({
include: ["**/preact/*"],
Expand Down
11 changes: 11 additions & 0 deletions src/assets/product-logos/default-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 3 additions & 10 deletions src/assets/product-logos/general-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 3 additions & 17 deletions src/assets/product-logos/node-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 2 additions & 10 deletions src/assets/product-logos/quickstart-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { isMatchedPath } from "../../Header/Nav/isMatchedPath"
import { getNavigationProps } from "../../Header/getNavigationProps"
import styles from "./docsPickerDesktop.module.css"
import { clsx } from "../../Header/Nav/utils"
import defaultLogo from "../../../assets/product-logos/default-logo.svg"

function DocsPickerDesktop({ pathname }: { pathname: string }) {
const [productMenuOpen, setProductMenuOpen] = useState(false)
const { subProductsNav } = getNavigationProps()
const subProductTrigger = subProductsNav?.find(({ href }) => isMatchedPath(pathname, href))

const label = subProductTrigger?.label || "Resources"
const icon = subProductTrigger?.label ? subProductTrigger.icon : undefined
const icon = subProductTrigger?.label ? subProductTrigger.icon : defaultLogo.src

return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ProductContent } from "./ProductContent"
import { SubProductContent } from "./SubProductContent"
import styles from "./productNavigation.module.css"
import { getNavigationProps } from "../../Header/getNavigationProps"
import defaultLogo from "../../../assets/product-logos/default-logo.svg"

type Props = {
path: string
Expand All @@ -32,7 +33,7 @@ export function ProductNavigation({ path }: Props) {
const subProductTrigger = subProductsNav?.find(({ href }) => isMatchedPath(path, href))

const label = subProductTrigger?.label || "Resources"
const icon = subProductTrigger?.label ? subProductTrigger.icon : undefined
const icon = subProductTrigger?.label ? subProductTrigger.icon : defaultLogo.src

useEffect(() => {
const foundSubProduct = productsNav.categories.find((category) =>
Expand Down
30 changes: 21 additions & 9 deletions src/components/Header/getNavigationProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,25 @@ const desktopSubProductsNav = [
icon: quickstartLogo.src,
col: 2,
},

{
label: "Documentation",
href: "/",
hideFromDropdown: true,
col: 2,
},
{
label: "General",
href: "/getting-started",
icon: generalLogo.src,
col: 2,
},
{
label: "General",
href: "/resources",
icon: generalLogo.src,
col: 2,
hideFromDropdown: true,
},
]

const docsSections = [
Expand Down Expand Up @@ -147,29 +159,29 @@ const docsSections = [
icon: automationLogo.src,
subProducts: getSubProducts(sidebar.automation),
},
{
label: "Chainlink Local",
href: "/chainlink-local",
icon: chainlinkLocal.src,
subProducts: getSubProducts(sidebar.chainlinkLocal),
},
{
label: "Nodes",
href: "/chainlink-nodes",
icon: nodesLogo.src,
subProducts: getSubProducts(sidebar.nodeOperator),
},
{
label: "Chainlink Local",
href: "/chainlink-local",
label: "Quickstarts",
href: "/quickstarts",
icon: quickstartLogo.src,
subProducts: getSubProducts(sidebar.chainlinkLocal),
},
{
label: "General",
href: "/resources",
icon: generalLogo.src,
subProducts: getSubProducts(sidebar.global),
},
{
label: "Quickstarts",
href: "/quickstarts",
icon: quickstartLogo.src,
},
],
},
]
Expand Down
3 changes: 2 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const formattedContentTitle = `${CONFIG.PAGE.titleFallback} | ${CONFIG.SITE.titl
<h4>Recommended reading</h4>
<h2>We think you'd love to explore</h2>
<div>
<a href="/resources/link-token-contracts">LINK Token Contracts</a>
<a href="/getting-started/conceptual-overview">General</a>
<a href="/resources/link-token-contracts">Link Token Contracts</a>
<a href="/ccip/getting-started">Getting Started with CCIP</a>
<a href="/ccip/supported-networks">CCIP Supported Networks</a>
<a href="/data-feeds/price-feeds/addresses">Data Feed Addresses</a>
Expand Down

0 comments on commit a178c26

Please sign in to comment.