From 359fcef46882ce54b9e0a97e546d04882cebee8d Mon Sep 17 00:00:00 2001 From: David Cheung Date: Wed, 7 Jul 2021 17:50:11 -0400 Subject: [PATCH] doc-site: toc page links to stay on same tab adding some description to each item, and making target="_self" when people get to the table of content page its already a new tab staying on the same tab from the table of content page --- .github/workflows/doc-site.yml | 1 - doc-site/src/pages/docs/index.mdx | 31 +++++++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/doc-site.yml b/.github/workflows/doc-site.yml index f53575fd..fe2d0c77 100644 --- a/.github/workflows/doc-site.yml +++ b/.github/workflows/doc-site.yml @@ -8,7 +8,6 @@ on: push: branches: - main - - doc-site paths: - doc-site/** diff --git a/doc-site/src/pages/docs/index.mdx b/doc-site/src/pages/docs/index.mdx index 3c9bb6ce..08f6ccec 100644 --- a/doc-site/src/pages/docs/index.mdx +++ b/doc-site/src/pages/docs/index.mdx @@ -1,32 +1,34 @@ -import { Redirect } from 'react-router-dom'; - export const data = { zero: { - target : "_self", repo: "commitdev/zero", + desc: "CLI tool to step by step setup and provision your infrastructure and application", name: "Zero CLI", path: "/docs/zero" }, modules : [ { repo: "commitdev/zero-aws-eks-stack", + desc: "Infrastructure as Code Template on top of AWS EKS with all the best practices we have accumulated", name: "AWS EKS stack", - path: "/docs/modules/aws-eks-stack" + path: '/docs/modules/aws-eks-stack', }, { repo: "commitdev/zero-deployable-backend", + desc: "Business logic agnostic Backend template in GoLang, set up a service which can be deployed to Zero's infrastructure", name: "Backend Application - GoLang", - path: "/docs/modules/backend-go" + path: '/docs/modules/backend-go', }, { repo: "commitdev/zero-deployable-node-backend", + desc: "Business logic agnostic Backend template in Node.js, set up a service which can be deployed to Zero's infrastructure", name: "Backend Application - Node.js", - path: "/docs/modules/backend-nodejs" + path: '/docs/modules/backend-nodejs', }, { repo: "commitdev/zero-deployable-react-frontend", + desc: "Business logic agnostic Frontend template using React, ships with CI/CD pipeline deployed to AWS S3 and Cloudfront", name: "Frontend Application - Reactjs", - path: "/docs/modules/frontend-react" + path: '/docs/modules/frontend-react', }, ], }; @@ -34,20 +36,25 @@ export const data = { export const Entry = ({entry}) => { return

{entry.name}

+ {entry.desc}
Documentation: - Link + Link
Github Repository: - Link + Link
} export const Modules = () => { return (<> - {data.modules.map(entry=> )} + {data.modules.map((entry, idx)=> )} ) }; @@ -56,11 +63,11 @@ export const Modules = () => {
- ## Main + ## Zero ## Modules -
\ No newline at end of file +