Skip to content

Commit f37d8e7

Browse files
committed
docs: initial move to vitepress for documentation
1 parent 17ae419 commit f37d8e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3332
-540
lines changed

docs/.vitepress/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cache
2+
dist

docs/.vitepress/config.mts

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import { defineConfig } from "vitepress";
2+
import { generateSidebar } from "vitepress-sidebar";
3+
import robotframework from "../../syntaxes/robotframework.tmLanguage.json";
4+
import { readFileSync } from "fs";
5+
6+
const python_svg = readFileSync("docs/images/python.svg", "utf-8");
7+
const vscode_svg = readFileSync("docs/images/vscode.svg", "utf-8");
8+
const opencollective_svg = readFileSync("docs/images/opencollective.svg", "utf-8");
9+
10+
// https://vitepress.dev/reference/site-config
11+
export default defineConfig({
12+
title: "RobotCode",
13+
description: "Robot Framework for Visual Studio Code and more",
14+
15+
lastUpdated: true,
16+
cleanUrls: true,
17+
metaChunk: true,
18+
19+
themeConfig: {
20+
// https://vitepress.dev/reference/default-theme-config
21+
logo: { src: "/robotcode-logo.svg", alt: "RobotCode Logo" },
22+
outline: {
23+
level: "deep",
24+
},
25+
externalLinkIcon: true,
26+
footer: {
27+
message:
28+
'Released under the <a href="https://github.com/robotcodedev/robotcode/blob/main/LICENSE.txt">Apache-2.0</a>.',
29+
copyright: 'Copyright © 2022-present <a href="https://github.com/d-biehl">Daniel Biehl</a>',
30+
},
31+
nav: [
32+
{ text: "Home", link: "/" },
33+
{ text: "Documentation", link: "/01_about" },
34+
{ text: "Contribute", link: "https://github.com/robotcodedev" },
35+
{ text: "Q&A", link: "https://github.com/robotcodedev/robotcode/discussions/categories/q-a" },
36+
],
37+
search: {
38+
provider: "local",
39+
},
40+
editLink: {
41+
pattern: "https://github.com/robotcodedev/robotcode/edit/main/docs/:path",
42+
},
43+
// sidebar: [
44+
// {
45+
// text: 'Examples',
46+
// items: [
47+
// { text: 'Markdown Examples', link: '/markdown-examples' },
48+
// { text: 'Runtime API Examples', link: '/api-examples' }
49+
// ]
50+
// }
51+
// ],
52+
sidebar: generateSidebar({
53+
documentRootPath: "docs",
54+
collapsed: true,
55+
useTitleFromFileHeading: true,
56+
useTitleFromFrontmatter: true,
57+
useFolderLinkFromIndexFile: true,
58+
useFolderTitleFromIndexFile: true,
59+
}),
60+
socialLinks: [
61+
{ icon: "github", link: "https://github.com/robotcodedev/robotcode" },
62+
{ icon: { svg: python_svg }, link: "https://pypi.org/project/robotcode/" },
63+
{ icon: { svg: vscode_svg }, link: "https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode" },
64+
{ icon: { svg: opencollective_svg }, link: "https://opencollective.com/robotcode" },
65+
],
66+
},
67+
markdown: {
68+
image: {
69+
lazyLoading: true
70+
},
71+
lineNumbers: true,
72+
theme: { light: "material-theme-lighter", dark: "material-theme-darker" },
73+
headers: {
74+
level: [2, 3, 4],
75+
},
76+
math: true,
77+
languages: [robotframework as any],
78+
languageAlias: {
79+
robot: "robotframework",
80+
},
81+
toc: {
82+
level: [2, 3, 4],
83+
},
84+
},
85+
});

docs/.vitepress/theme/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// https://vitepress.dev/guide/custom-theme
2+
import { h } from 'vue'
3+
import type { Theme } from 'vitepress'
4+
import DefaultTheme from 'vitepress/theme'
5+
import './style.css'
6+
7+
export default {
8+
extends: DefaultTheme,
9+
Layout: () => {
10+
return h(DefaultTheme.Layout, null, {
11+
// https://vitepress.dev/guide/extending-default-theme#layout-slots
12+
})
13+
},
14+
enhanceApp({ app, router, siteData }) {
15+
// ...
16+
}
17+
} satisfies Theme

docs/.vitepress/theme/style.css

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
/**
2+
* Customize default theme styling by overriding CSS variables:
3+
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4+
*/
5+
6+
/**
7+
* Colors
8+
*
9+
* Each colors have exact same color scale system with 3 levels of solid
10+
* colors with different brightness, and 1 soft color.
11+
*
12+
* - `XXX-1`: The most solid color used mainly for colored text. It must
13+
* satisfy the contrast ratio against when used on top of `XXX-soft`.
14+
*
15+
* - `XXX-2`: The color used mainly for hover state of the button.
16+
*
17+
* - `XXX-3`: The color for solid background, such as bg color of the button.
18+
* It must satisfy the contrast ratio with pure white (#ffffff) text on
19+
* top of it.
20+
*
21+
* - `XXX-soft`: The color used for subtle background such as custom container
22+
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
23+
* on top of it.
24+
*
25+
* The soft color must be semi transparent alpha channel. This is crucial
26+
* because it allows adding multiple "soft" colors on top of each other
27+
* to create a accent, such as when having inline code block inside
28+
* custom containers.
29+
*
30+
* - `default`: The color used purely for subtle indication without any
31+
* special meanings attched to it such as bg color for menu hover state.
32+
*
33+
* - `brand`: Used for primary brand colors, such as link text, button with
34+
* brand theme, etc.
35+
*
36+
* - `tip`: Used to indicate useful information. The default theme uses the
37+
* brand color for this by default.
38+
*
39+
* - `warning`: Used to indicate warning to the users. Used in custom
40+
* container, badges, etc.
41+
*
42+
* - `danger`: Used to show error, or dangerous message to the users. Used
43+
* in custom container, badges, etc.
44+
* -------------------------------------------------------------------------- */
45+
46+
:root {
47+
--vp-c-default-1: var(--vp-c-gray-1);
48+
--vp-c-default-2: var(--vp-c-gray-2);
49+
--vp-c-default-3: var(--vp-c-gray-3);
50+
--vp-c-default-soft: var(--vp-c-gray-soft);
51+
52+
--vp-c-brand-1: var(--vp-c-indigo-1);
53+
--vp-c-brand-2: var(--vp-c-indigo-2);
54+
--vp-c-brand-3: var(--vp-c-indigo-3);
55+
--vp-c-brand-soft: var(--vp-c-indigo-soft);
56+
57+
--vp-c-tip-1: var(--vp-c-brand-1);
58+
--vp-c-tip-2: var(--vp-c-brand-2);
59+
--vp-c-tip-3: var(--vp-c-brand-3);
60+
--vp-c-tip-soft: var(--vp-c-brand-soft);
61+
62+
--vp-c-warning-1: var(--vp-c-yellow-1);
63+
--vp-c-warning-2: var(--vp-c-yellow-2);
64+
--vp-c-warning-3: var(--vp-c-yellow-3);
65+
--vp-c-warning-soft: var(--vp-c-yellow-soft);
66+
67+
--vp-c-danger-1: var(--vp-c-red-1);
68+
--vp-c-danger-2: var(--vp-c-red-2);
69+
--vp-c-danger-3: var(--vp-c-red-3);
70+
--vp-c-danger-soft: var(--vp-c-red-soft);
71+
}
72+
73+
/**
74+
* Component: Button
75+
* -------------------------------------------------------------------------- */
76+
77+
:root {
78+
--vp-button-brand-border: transparent;
79+
--vp-button-brand-text: var(--vp-c-white);
80+
--vp-button-brand-bg: var(--vp-c-brand-3);
81+
--vp-button-brand-hover-border: transparent;
82+
--vp-button-brand-hover-text: var(--vp-c-white);
83+
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
84+
--vp-button-brand-active-border: transparent;
85+
--vp-button-brand-active-text: var(--vp-c-white);
86+
--vp-button-brand-active-bg: var(--vp-c-brand-1);
87+
}
88+
89+
/**
90+
* Component: Home
91+
* -------------------------------------------------------------------------- */
92+
93+
:root {
94+
--vp-home-hero-name-color: transparent;
95+
--vp-home-hero-name-background: -webkit-linear-gradient(
96+
90deg,
97+
#234a34 10%,
98+
#e9e9e2
99+
);
100+
101+
--vp-home-hero-image-background-image: linear-gradient(
102+
-45deg,
103+
#242f29 50%,
104+
#2e4e31 50%
105+
);
106+
--vp-home-hero-image-filter: blur(44px);
107+
}
108+
109+
@media (min-width: 640px) {
110+
:root {
111+
--vp-home-hero-image-filter: blur(56px);
112+
}
113+
}
114+
115+
@media (min-width: 960px) {
116+
:root {
117+
--vp-home-hero-image-filter: blur(68px);
118+
}
119+
}
120+
121+
/**
122+
* Component: Custom Block
123+
* -------------------------------------------------------------------------- */
124+
125+
:root {
126+
--vp-custom-block-tip-border: transparent;
127+
--vp-custom-block-tip-text: var(--vp-c-text-1);
128+
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
129+
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
130+
}
131+
132+
/**
133+
* Component: Algolia
134+
* -------------------------------------------------------------------------- */
135+
136+
.DocSearch {
137+
--docsearch-primary-color: var(--vp-c-brand-1) !important;
138+
}
139+
140+
/**
141+
* Typography
142+
* -------------------------------------------------------------------------- */
143+
144+
:root {
145+
--vp-font-family-base: 'Inter', ui-sans-serif, system-ui, sans-serif,
146+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
147+
--vp-font-family-mono: ui-monospace, 'Menlo', 'Monaco', 'Consolas',
148+
'Liberation Mono', 'Courier New', monospace;
149+
font-optical-sizing: auto;
150+
}
151+
152+
:root:where(:lang(zh)) {
153+
--vp-font-family-base: 'Punctuation SC', 'Inter', ui-sans-serif, system-ui,
154+
'PingFang SC', 'Noto Sans CJK SC', 'Noto Sans SC', 'Heiti SC', 'DengXian',
155+
'Microsoft YaHei', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
156+
'Segoe UI Symbol', 'Noto Color Emoji';
157+
}
158+
159+
.VPHero .name {
160+
font-family: "Courier New", system-ui;
161+
}

docs/01_about/index.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
description: The About page of the RobotCode documentation.
3+
4+
---
5+
# About
6+
7+
8+
[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/d-biehl.robotcode?style=flat&label=VS%20Marketplace&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
9+
[![Installs](https://img.shields.io/visual-studio-marketplace/i/d-biehl.robotcode?style=flat)](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode)
10+
[![Build Status](https://img.shields.io/github/actions/workflow/status/robotcodedev/robotcode/build-test-package-publish.yml?branch=main&style=flat&logo=github)](https://github.com/robotcodedev/robotcode/actions?query=workflow:build_test_package_publish)
11+
[![License](https://img.shields.io/github/license/robotcodedev/robotcode?style=flat&logo=apache)](https://github.com/robotcodedev/robotcode/blob/master/LICENSE)
12+
[![PyPI - Version](https://img.shields.io/pypi/v/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)
13+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotcode.svg?style=flat)](https://pypi.org/project/robotcode)
14+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/robotcode.svg?style=flat&label=downloads)](https://pypi.org/project/robotcode/)
15+
16+
----
17+
18+
[[toc]]
19+
20+
An [extension](https://marketplace.visualstudio.com/VSCode) which brings support for [RobotFramework](https://robotframework.org/)
21+
to [Visual Studio Code](https://code.visualstudio.com/), including [features](#features) like code completion, debugging, test explorer, refactoring and more!
22+
23+
## Features
24+
25+
With RobotCode you can edit your code with auto-completion, code navigation, syntax checking and many more.
26+
Here is a list of Features:
27+
28+
- [Autocomplete and IntelliSense](#Autocomplete-and-IntelliSense)
29+
- [Code Navigation](#code-navigation)
30+
- [Diagnostics and Linting](#diagnostics-and-linting)
31+
- [Code Formatting](#code-formatting)
32+
- [Running and Debugging](#running-and-debugging)
33+
- [Multi-root Workspace folders](#multi-root-workspace-folders)
34+
- Find implementations and references of keywords, variables, libraries, resource and variable files
35+
- Show codelenses for keyword definitions
36+
- Test Explorer
37+
- Refactorings
38+
- renaming keywords, variables, tags
39+
40+
### Autocomplete and IntelliSense
41+
42+
Autocompletion for:
43+
- Libraries with parameters
44+
- Resources,
45+
- Variables
46+
- Keywords with parameters
47+
- Namespaces
48+
49+
![Autocomplete Libraries and Keywords](./../images/autocomplete1.gif)
50+
51+
Autocompletion supports all supported variables types
52+
- local variables
53+
- variables from resource files
54+
- variables from variables file (.py and .yaml)
55+
- static and dynamic
56+
- command line variables
57+
- builtin variables
58+
59+
![Autocomplete Variables](./../images/autocomplete2.gif)
60+
61+
### Code Navigation
62+
63+
- Symbols
64+
- Goto definitions and implementations
65+
- Keywords
66+
- Variables
67+
- Libraries
68+
- Resources
69+
- Find references
70+
- Keywords
71+
- Variables
72+
- Imports
73+
- Libraries
74+
- Resources
75+
- Variables
76+
- Tags
77+
- Errors and Warnings
78+
79+
### Diagnostics and Linting
80+
81+
RobotCode analyse your code and show diagnostics for:
82+
83+
- Syntax Errors
84+
- Unknown keywords
85+
- Duplicate keywords
86+
- Missing libraries, resource and variable imports
87+
- Duplicate libraries, resource and variable imports
88+
- ... and many more
89+
90+
For most things RobotCode uses the installed RobotFramework version to parse and analyse the code, so you get the same errors as when you run it.
91+
92+
93+
Get additional code analysis with [Robocop](https://robocop.readthedocs.io/). Just install it in your python environment.
94+
95+
### Code Formatting
96+
97+
RobotCode can format your code with the internal RobotFramework robot.tidy tool (deprecated), but also with [Robotidy](https://robotidy.readthedocs.io/). Just install it.
98+
99+
### Running and Debugging
100+
101+
RobotCode supports running and debugging of RobotFramework testcases and tasks out of the box, directly from the definition of the test or suite.
102+
103+
![Running Tests](./../images/running_tests.gif)
104+
105+
In the debug console you can see all log messages of the current run and navigate to the keyword the message was written by.
106+
107+
### Multi-root Workspace folders
108+
109+
RobotCodes support for [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces), enables loading and editing different Robotframework projects/folders with different RobotFramework/Python environments and settings at the same time or you can share the same RobotFramework/Python environment and settings for all folders in the workspace.
File renamed without changes.
File renamed without changes.

docs/02_get_started/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Get Started
2+
3+
TODO
File renamed without changes.

0 commit comments

Comments
 (0)