diff --git a/astro.config.mjs b/astro.config.mjs index 0baf00a..265352f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,6 +1,7 @@ import { defineConfig } from 'astro/config'; import codeblocks from "@thewebforge/astro-code-blocks"; import preload from "astro-preload"; +import * as config from './src/config.js'; import mdx from "@astrojs/mdx"; @@ -11,5 +12,6 @@ export default defineConfig({ // Copy Button Options copyButtonTitle: 'Copy', copyButtonTooltip: 'Copied to clipboard', -}), mdx()] + }), mdx()], + redirects: config.REDIRECTS, }); \ No newline at end of file diff --git a/src/components/APIArguments.astro b/src/components/APIArguments.astro new file mode 100644 index 0000000..5977cb1 --- /dev/null +++ b/src/components/APIArguments.astro @@ -0,0 +1,56 @@ +--- +const {args} = Astro.props; +--- + +{(args && args.length) ? ( +
+ {arg.name}
+ + + {!arg.is_required && ( + "optional " + )} + {arg.type} + + |
+ + {arg.description} + | +
---|
{example}
*/} +
+
+ ↓
+{config.API_REPOS[repo].description}
+ + {config.API_REPOS[repo].playground && ( +Available in Playground
+ )} +