From 901576d4ef5b6dc14358663db16c604cf6b5024b Mon Sep 17 00:00:00 2001 From: darius Date: Sat, 4 May 2024 22:32:29 +0200 Subject: [PATCH] docs added --- Writerside/c.list | 6 +++ Writerside/cfg/buildprofiles.xml | 12 +++++ Writerside/kleincord.tree | 12 +++++ Writerside/topics/How-to.md | 37 ++++++++++++++ Writerside/topics/Overview.md | 18 +++++++ Writerside/topics/starter-topic.md | 79 ++++++++++++++++++++++++++++++ Writerside/v.list | 5 ++ Writerside/writerside.cfg | 8 +++ go.sum | 1 + handlers/httpCommand.go | 5 +- 10 files changed, 179 insertions(+), 4 deletions(-) create mode 100644 Writerside/c.list create mode 100644 Writerside/cfg/buildprofiles.xml create mode 100644 Writerside/kleincord.tree create mode 100644 Writerside/topics/How-to.md create mode 100644 Writerside/topics/Overview.md create mode 100644 Writerside/topics/starter-topic.md create mode 100644 Writerside/v.list create mode 100644 Writerside/writerside.cfg diff --git a/Writerside/c.list b/Writerside/c.list new file mode 100644 index 0000000..c4c77a2 --- /dev/null +++ b/Writerside/c.list @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/Writerside/cfg/buildprofiles.xml b/Writerside/cfg/buildprofiles.xml new file mode 100644 index 0000000..960a88e --- /dev/null +++ b/Writerside/cfg/buildprofiles.xml @@ -0,0 +1,12 @@ + + + + + + + false + + + + diff --git a/Writerside/kleincord.tree b/Writerside/kleincord.tree new file mode 100644 index 0000000..bf418fd --- /dev/null +++ b/Writerside/kleincord.tree @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/Writerside/topics/How-to.md b/Writerside/topics/How-to.md new file mode 100644 index 0000000..04236f6 --- /dev/null +++ b/Writerside/topics/How-to.md @@ -0,0 +1,37 @@ +# How to + +A How-to article is an action-oriented type of document. +It explains how to perform a specific task or solve a problem, and usually contains a sequence of steps. +Start with a short introductory paragraph that explains what users will accomplish by following this procedure, +what they need to perform it for, or define the target audience of the doc. + +> **Highlight important information** +> +> You can change the element to *tip* or *warning* by renaming the style attribute below. +> +{style="note"} + +## Before you start + +It is good practice to list the prerequisites that are required or recommended. + +Make sure that: +- First prerequisite +- Second prerequisite + +## How to perform a task + +Some introductory information. + +1. Step with a code block + + ```bash + run this --that + ``` + +2. Step with a [link](https://www.jetbrains.com) + +3. Step with a list. + - List item + - List item + - List item \ No newline at end of file diff --git a/Writerside/topics/Overview.md b/Writerside/topics/Overview.md new file mode 100644 index 0000000..0361334 --- /dev/null +++ b/Writerside/topics/Overview.md @@ -0,0 +1,18 @@ +# Overview + +Overview articles give background information and provide context to a particular subject. +Their goal is to explain a concept, not to teach or give instructions. + +## What is product/service/concept + +Provide some background and context, explain choices and alternatives. + +## Glossary + +A definition list or a glossary: + +First Term +: This is the definition of the first term. test + +Second Term +: This is the definition of the second term. diff --git a/Writerside/topics/starter-topic.md b/Writerside/topics/starter-topic.md new file mode 100644 index 0000000..068391c --- /dev/null +++ b/Writerside/topics/starter-topic.md @@ -0,0 +1,79 @@ +# About Kleincord + + + +## Add new topics +You can create empty topics, or choose a template for different types of content that contains some boilerplate structure to help you get started: + +![Create new topic options](new_topic_options.png){ width=290 }{border-effect=line} + +## Write content +%product% supports two types of markup: Markdown and XML. +When you create a new help article, you can choose between two topic types, but this doesn't mean you have to stick to a single format. +You can author content in Markdown and extend it with semantic attributes or inject entire XML elements. + +## Inject XML +For example, this is how you inject a procedure: + + + +

Start typing and select a procedure type from the completion suggestions:

+ completion suggestions for procedure +
+ +

Press Tab or Enter to insert the markup.

+
+
+ +## Add interactive elements + +### Tabs +To add switchable content, you can make use of tabs (inject them by starting to type `tab` on a new line): + + + + ![Alt Text](new_topic_options.png){ width=450 } + + + + ]]> + + + +### Collapsible blocks +Apart from injecting entire XML elements, you can use attributes to configure the behavior of certain elements. +For example, you can collapse a chapter that contains non-essential information: + +#### Supplementary info {collapsible="true"} +Content under a collapsible header will be collapsed by default, +but you can modify the behavior by adding the following attribute: +`default-state="expanded"` + +### Convert selection to XML +If you need to extend an element with more functions, you can convert selected content from Markdown to semantic markup. +For example, if you want to merge cells in a table, it's much easier to convert it to XML than do this in Markdown. +Position the caret anywhere in the table and press Alt+Enter: + +Convert table to XML + +## Feedback and support +Please report any issues, usability improvements, or feature requests to our +YouTrack project +(you will need to register). + +You are welcome to join our +public Slack workspace. +Before you do, please read our [Code of conduct](https://plugins.jetbrains.com/plugin/20158-writerside/docs/writerside-code-of-conduct.html). +We assume that you’ve read and acknowledged it before joining. + +You can also always email us at [writerside@jetbrains.com](mailto:writerside@jetbrains.com). + + + + Markup reference + Reorder topics in the TOC + Build and publish + Configure Search + + \ No newline at end of file diff --git a/Writerside/v.list b/Writerside/v.list new file mode 100644 index 0000000..2d12cb3 --- /dev/null +++ b/Writerside/v.list @@ -0,0 +1,5 @@ + + + + + diff --git a/Writerside/writerside.cfg b/Writerside/writerside.cfg new file mode 100644 index 0000000..63476c4 --- /dev/null +++ b/Writerside/writerside.cfg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/go.sum b/go.sum index 1a619be..6719600 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,7 @@ github.com/bwmarrin/discordgo v0.28.1 h1:gXsuo2GBO7NbR6uqmrrBDplPUx2T3nzu775q/Rd github.com/bwmarrin/discordgo v0.28.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg= diff --git a/handlers/httpCommand.go b/handlers/httpCommand.go index fba98ee..27040e2 100644 --- a/handlers/httpCommand.go +++ b/handlers/httpCommand.go @@ -20,10 +20,7 @@ func HttpCommand(data discordgo.ApplicationCommandInteractionData, s *discordgo. var response *http.Response var responsColor int - for i, option := range data.Options { - if len(option.Options) > i+1 { - break - } + for _, option := range data.Options { switch option.Name { case "type": requestType = option.Value.(string)