Skip to content

Commit

Permalink
docs: reorganize docs files
Browse files Browse the repository at this point in the history
  • Loading branch information
MR-Addict committed Feb 23, 2024
1 parent b388c0e commit 7b6d24e
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 44 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ jobs:
- name: Build book
run: |
cd backend
chmod u+x example/assets/bin/* && cp example/assets/bin/* /usr/local/bin
cargo build --release && mdbook build example
cargo build --release --manifest-path backend/Cargo.toml
chmod u+x docs/assets/bin/* && cp docs/assets/bin/* /usr/local/bin && mdbook build docs
- name: Merge build assets
run: |
mv backend/example/book build
mv docs/book build
mv frontend/dist build/embed
- name: Deploy to github pages
Expand Down
56 changes: 28 additions & 28 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ version = "0.2.3"
edition = "2021"
license = "MIT"
readme = "../README.md"
exclude = ["example/*"]
keywords = ["mdbook", "repl", "plugin", "preprocessor"]
authors = ["MR-Addict <MR-Addict@qq.com>"]
repository = "https://github.com/MR-Addict/mdbook-repl"
documentation = "https://mr-addict.github.io/mdbook-repl"
description = "A rust based mdbook preprocessor plugin that allows you to live code in your markdown book."
description = "A rust based mdbook preprocessor that allows you to execute code in your mdbook without any server. Python, Typescript, Javascript etc."

[dependencies]
clap = "4.5.0"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/example/book.toml → docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ heading-split-level = 3
copy-js = true

[preprocessor.repl]
command = "target/release/mdbook-repl"
command = "backend/target/release/mdbook-repl"

# iframe url
src = "https://mr-addict.github.io/mdbook-repl/embed/"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 5 additions & 9 deletions backend/example/src/usage.md → docs/src/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

This preprocessor is designed to be used with [mdbook](https://rust-lang.github.io/mdBook). If you want to use this repl in your own web project other thatn mdbook, you can have a look at [For Developers](for-developers.md) section.
This preprocessor is designed to be used with [mdbook](https://rust-lang.github.io/mdBook). If you want to use this repl in your own web project other than mdbook, you can have a look at [For Developers](for-developers.md) section.

## Installation

Expand Down Expand Up @@ -82,13 +82,11 @@ Here is the full list of extensions:

You can also specific some options for the each codeblock. For example, you can specify the **readonly** for the codeblock:

<pre><code>
&#96;&#96;&#96;javascript,readonly
<pre><code class="language-markdown">&#96;&#96;&#96;javascript,readonly
// javascript codeblock

console.log("Hello, world!");
&#96;&#96;&#96;
</code></pre>
&#96;&#96;&#96;</code></pre>

And the codeblock will not be eidtable:

Expand All @@ -100,13 +98,11 @@ console.log("Hello, world!");

If you put **norepl** option in the codeblock:

<pre><code>
&#96;&#96;&#96;javascript,norepl
<pre><code class="language-markdown">&#96;&#96;&#96;javascript,norepl
// javascript codeblock

console.log("Hello, world!");
&#96;&#96;&#96;
</code></pre>
&#96;&#96;&#96;</code></pre>

And it will not be rendered by this preprocessor:

Expand Down

0 comments on commit 7b6d24e

Please sign in to comment.