From 1f536a04b15f0d35634e74734caf20d0dd626080 Mon Sep 17 00:00:00 2001 From: parbez Date: Sun, 31 Jul 2022 21:49:41 +0530 Subject: [PATCH] docs: improve codeblocks --- .../src/lib/Parsers/Cooldown.ts | 6 ++--- .../src/lib/Parsers/Embed.ts | 24 +++++++++---------- typedoc.json | 3 ++- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/tagscript-plugin-discord/src/lib/Parsers/Cooldown.ts b/packages/tagscript-plugin-discord/src/lib/Parsers/Cooldown.ts index c28e82fc..8d0fc89f 100644 --- a/packages/tagscript-plugin-discord/src/lib/Parsers/Cooldown.ts +++ b/packages/tagscript-plugin-discord/src/lib/Parsers/Cooldown.ts @@ -9,15 +9,15 @@ import { BaseParser, type Context, type IParser } from 'tagscript'; * * @usage * ```yaml - * {cooldown(seconds):response} + * { cooldown(seconds): response } * ``` * * @alias cd * * @example * ```yaml - * {cooldown(5):This tag is on cooldown.} - * {cooldown(5):The tag {name} is on cooldown. Please try again in {retryAfter}.} + * { cooldown(5): This tag is on cooldown. } + * { cooldown(5): The tag {name} is on cooldown. Please try again in {retryAfter}. } * ``` * */ diff --git a/packages/tagscript-plugin-discord/src/lib/Parsers/Embed.ts b/packages/tagscript-plugin-discord/src/lib/Parsers/Embed.ts index 4ae71a78..e9d13d5a 100644 --- a/packages/tagscript-plugin-discord/src/lib/Parsers/Embed.ts +++ b/packages/tagscript-plugin-discord/src/lib/Parsers/Embed.ts @@ -11,30 +11,30 @@ import type { EmbedData, APIEmbed } from 'discord.js'; * Using JSON * @usage * ```yaml - * {embed:json} + * { embed: json } * ``` * @example * ```yaml - * {embed:{"title":"Hello!", "description":"This is a test embed."}} - * {embed:{ - * "title":"Here's a random duck!", - * "image":{"url":"https://random-d.uk/api/randomimg"}, - * "color":15194415 - * }} + * { embed: { "title": "Hello!", "description": "This is a test embed." } } + * { embed: { + * "title": "Here's a random duck!", + * "image": { "url": "https://random-d.uk/api/randomimg" }, + * "color": 15194415 + * } } * ``` * * Using properties * @usage * ```yaml - * {embed(property):value} + * { embed(property): value } * ``` * * @example * ```yaml - * {embed(color):0x37b2cb} - * {embed(title):Rules} - * {embed(description):Follow these rules to ensure a good experience in our server!} - * {embed(field):Rule 1|Respect everyone you speak to.|false} + * { embed(color): 0x37b2cb } + * { embed(title): Rules } + * { embed(description): Follow these rules to ensure a good experience in our server! } + * { embed(field): Rule 1|Respect everyone you speak to.|false } * ``` * * @see The return type depends on user's input. So it might not be `EmbedData | APIEmbed`. So use a typeguard to check. diff --git a/typedoc.json b/typedoc.json index 4ac64092..dfe8a31f 100644 --- a/typedoc.json +++ b/typedoc.json @@ -7,5 +7,6 @@ "name": "TagScript", "out": "./docs/", "tsconfig": "./tsconfig.base.json", - "externalLinkPath": "scripts/externalConfig.js" + "externalLinkPath": "scripts/externalConfig.js", + "hideGenerator": true }