How to use the @docusaurus/theme-common.useThemeConfig function in @docusaurus/theme-common

To help you get started, we’ve selected a few @docusaurus/theme-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ory / kratos / docs / src / theme / Footer / index.js View on Github external
function Footer() {
  const { footer } = useThemeConfig()
  const { copyright, links = [], logo = {} } = footer || {}
  const logoUrl = useBaseUrl(logo.src)

  if (!footer) {
    return null
  }

  return (
    <footer>
      <div>
        {links &amp;&amp; links.length &gt; 0 &amp;&amp; (
          <div></div></div></footer>
github lyft / clutch / docs / _website / src / theme / Footer / index.tsx View on Github external
function Logo({...props}) {
  const {
    navbar: {logo = {} as NavbarLogo},
  } = useThemeConfig();
  const lyftLogoUrl = useBaseUrl('img/navigation/lyft-logo.svg');
  const logoImageUrl = useBaseUrl('img/navigation/logo.svg');

  return (
    <div>
      {logoImageUrl != null &amp;&amp; (
        &lt;&gt;
          <img alt="{logo.alt}" src="{logoImageUrl}">
          <div>
            by
          </div>
          </div>

@docusaurus/theme-common

Common code for Docusaurus themes.

MIT
Latest version published 7 days ago

Package Health Score

92 / 100
Full package analysis

Popular @docusaurus/theme-common functions

Similar packages