Skip to content

AdventuresInDevops/links-proxy

Repository files navigation

Authress media banner

Authress Knowledge Base

This is the source code for the Authress Knowledge Base.

Technology

  • NodeJS - Runtime
    • Recommendation nvm to install
  • Yarn - Package Manager

Authoring Articles

Keep this in mind: How to write documentation - diataxis

Development

Running server locally

  • run yarn (every time the package manifest changes, unlikely)
  • run yarn start

Building Production version

  • yarn
  • yarn build

Overwriting the theme

To add something to a page or content, find the relevant react component generating that content from ./node_modules/@docusaurus/theme-classic/src/theme/ and copy that directory into the /src/theme directory.

Front matter options

https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog#markdown-front-matter

TODO:

Rust Lambda Development

See Internal Authress kb-processor

Troubleshooting

If you get a page not found when running yarn start for a linked page:

  • Check to make sure that page is in the same hierarchy, you can't link from docs => articles, it must start with /knowledge-base in those cases
  • If it is in the same hierarchy, then run yarn build and fix the errors that show up, sometimes there are issues that yarn start doesn't catch.

Some tricks

import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
console.log('****', useDocusaurusContext());

import {useLocation} from '@docusaurus/router';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';

/**
 * Get the pathname of current route, without the optional site baseUrl.
 * - `/docs/myDoc` => `/docs/myDoc`
 * - `/baseUrl/docs/myDoc` => `/docs/myDoc`
 */
export function useLocalPathname(): string {
  const {
    siteConfig: {baseUrl},
  } = useDocusaurusContext();
  const {pathname} = useLocation();
  return pathname.replace(baseUrl, '/');
}

Notes while migrating to future version of docusaurus

  • Make sure all plugins work

About

The Link Proxy for the url shortener

Resources

License

Stars

Watchers

Forks

Packages

No packages published