0.2.7 • Published 7 months ago

docslab-docusaurus v0.2.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

docslab Docusaurus theme

This Docusaurus theme uses docslab to make fenced code blocks interactive.

To get started, add the docslab-docusaurus package to your docs sources:

yarn add docslab-docusaurus

or if using NPM, npm install --save docslab-docusaurus. Then, add it to the themes list in your docusaurus.config.js

// ...
themes: [
    // ...
    'docslab-docusaurus',
],

To make a code block interactive, add docslab to the language meta string, e.g.,

```cpp docslab hardshare=heliumdev/cubecell-draw-demo
// command: source .platformio/penv/bin/activate && cd m/Heltec-CubeCell-Board/examples/cubecell-helium-us915-basic && pio run -t upload && pio device monitor
// destpath: m/Heltec-CubeCell-Board/examples/cubecell-helium-us915-basic/src/main.cpp
// repoUrl: https://github.com/helium/longfi-platformio.git
// ---
#include "Arduino.h"

void setup()
{
    Serial.begin(115200);
}

void loop()
{
    delay(1000);
    Serial.println("Hola, mundo!");
}
```

or use the JSX component without Markdown, e.g.,

import { DocslabCodeBlock } from 'docslab-docusaurus/lib/theme/DocslabCodeBlock'

<DocslabCodeBlock
  hardshare="heliumdev/cubecell-draw-demo"
  className="language-cpp"
  command="source .platformio/penv/bin/activate && cd m/Heltec-CubeCell-Board/examples/cubecell-helium-us915-basic && pio run -t upload && pio device monitor"
  destpath="m/Heltec-CubeCell-Board/examples/cubecell-helium-us915-basic/src/main.cpp"
  repoUrl="https://github.com/helium/longfi-platformio.git"
  urlfile="https://raw.githubusercontent.com/helium/longfi-platformio/master/Heltec-CubeCell-Board/examples/cubecell-helium-us915-basic/src/main.cpp"
/>
0.2.7

7 months ago

0.2.6

7 months ago

0.2.5

7 months ago

0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago