Skip to content

Commit

Permalink
(docs): fix code examples - fixes #11763
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 30, 2023
1 parent e7684f0 commit a2f81bb
Show file tree
Hide file tree
Showing 4 changed files with 1,175 additions and 1,803 deletions.
2 changes: 1 addition & 1 deletion scripts/templates/template.eta
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mock.<%= it.command %>(<%= it.paramString %>)
| Name | Type | Details |
| ---- | ---- | ------- |
<% it.paramTags.forEach((paramTag) => { %>
| <code><var><%= paramTag.name %></var></code><% if ((!paramTag.required && typeof paramTag.optional === 'undefined') || paramTag.optional) { %><br /><span class="label labelWarning">optional</span><% } %> | <%= Array.isArray(paramTag.types) ? paramTag.types.map((type) => `<code>${type.replace(/>/g, "&gt;").replace(/</g, "&lt;")}</code>`).join(', ') : paramTag.type.split('|').join(', ').replace('(', '').replace(')', '') %> | <%= paramTag.description %> |
| <code><var><%= paramTag.name %></var></code><% if ((!paramTag.required && typeof paramTag.optional === 'undefined') || paramTag.optional) { %><br /><span className="label labelWarning">optional</span><% } %> | <%= Array.isArray(paramTag.types) ? paramTag.types.map((type) => `<code>${type.replace(/>/g, "&gt;").replace(/</g, "&lt;")}</code>`).join(', ') : paramTag.type.split('|').join(', ').replace('(', '').replace(')', '') %> | <%= paramTag.description %> |
<% }) %>
<% } %>

Expand Down
12 changes: 6 additions & 6 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const config: Config = {
} satisfies ThemeConfig,
presets: [
[
'@docusaurus/preset-classic', {
'classic', {
docs: {
sidebarPath: path.resolve(__dirname, 'sidebars.ts'),
// Please change this to your repo.
Expand Down Expand Up @@ -225,7 +225,7 @@ const config: Config = {
],
plugins: [
[
'@docusaurus/plugin-client-redirects',
'client-redirects',
{
fromExtensions: ['html'],
/**
Expand All @@ -250,7 +250,7 @@ const config: Config = {
}
],
[
'@docusaurus/plugin-content-docs',
'content-docs',
{
id: 'community',
path: 'community',
Expand All @@ -259,9 +259,9 @@ const config: Config = {
sidebarPath: path.resolve(__dirname, 'sidebarsCommunity.ts')
},
],
'@docusaurus/plugin-ideal-image',
'ideal-image',
[
'@docusaurus/plugin-pwa',
'pwa',
{
debug: false,
offlineModeActivationStrategies: ['appInstalled', 'queryString'],
Expand Down Expand Up @@ -318,7 +318,7 @@ const config: Config = {
},
],
],
themes: ['docusaurus-theme-github-codeblock'],
themes: [path.resolve(__dirname, 'node_modules', 'docusaurus-theme-github-codeblock', 'build', 'index.js')],
stylesheets: [
'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&display=block',
'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=block'
Expand Down

0 comments on commit a2f81bb

Please sign in to comment.