Skip to content

Commit

Permalink
Make "The Runtime" example interactive with mdbook-iced 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Mar 20, 2024
1 parent 083c1b0 commit 4471cbb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ jobs:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- name: Install mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- uses: hecrj/setup-rust-action@v2
- name: Install `mdbook`, `mdbook-iced`, and `wasm-bindgen-cli`
run: cargo install mdbook mdbook-iced wasm-bindgen-cli
- name: Add `wasm32-unknown-unknown` target to Rust toolchain
run: rustup target add wasm32-unknown-unknown
- name: Build book
run: mdbook build
- name: Copy CNAME
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
book
target
.icebergs
3 changes: 3 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ edit-url-template = "https://github.com/iced-rs/book/edit/master/{path}"

[output.html.playground]
runnable = false

[preprocessor.iced]
rev = "9db6ac8f202ebdc1453edee01da0b30aee0949d8"
2 changes: 1 addition & 1 deletion src/the-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ its own magic[^magic]—so you don't need to worry about learning the dark arts

If we want to run our `Counter`, all we have to do is call [`run`]:

```rust,ignore
```rust,ignore,iced(height=100px)
# use iced::widget::{button, column, text, Column};
#
pub fn main() -> iced::Result {
Expand Down

0 comments on commit 4471cbb

Please sign in to comment.