Skip to content

Commit d2cff67

Browse files
authored
fix(docs): indentation issues in <Steps> component (tauri-apps#2067) (fix tauri-apps#2065)
* fix: indentation issue * fix: identation issue in notification * add: extra leading * fix: indentation issue in single-instance * add: more spacing * more tests
1 parent 9d2b802 commit d2cff67

File tree

4 files changed

+54
-53
lines changed

4 files changed

+54
-53
lines changed

src/content/docs/features/logging.mdx

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,28 +78,29 @@ Install the log plugin to get started.
7878

7979
## Usage
8080

81-
<Steps>
82-
1. First, you need to register the plugin with Tauri.
83-
84-
```rust title="src-tauri/src/lib.rs" {1} {6-14}
85-
use tauri_plugin_log::{Target, TargetKind};
86-
87-
#[cfg_attr(mobile, tauri::mobile_entry_point)]
88-
pub fn run() {
89-
tauri::Builder::default()
90-
.plugin(
91-
tauri_plugin_log::Builder::new()
92-
.targets([
93-
Target::new(TargetKind::Stdout),
94-
Target::new(TargetKind::LogDir { file_name: None }),
95-
Target::new(TargetKind::Webview),
96-
])
97-
.build(),
98-
)
99-
.run(tauri::generate_context!())
100-
.expect("error while running tauri application");
101-
}
102-
```
81+
<Steps>
82+
83+
1. First, you need to register the plugin with Tauri.
84+
85+
```rust title="src-tauri/src/lib.rs" {1} {6-14}
86+
use tauri_plugin_log::{Target, TargetKind};
87+
88+
#[cfg_attr(mobile, tauri::mobile_entry_point)]
89+
pub fn run() {
90+
tauri::Builder::default()
91+
.plugin(
92+
tauri_plugin_log::Builder::new()
93+
.targets([
94+
Target::new(TargetKind::Stdout),
95+
Target::new(TargetKind::LogDir { file_name: None }),
96+
Target::new(TargetKind::Webview),
97+
])
98+
.build(),
99+
)
100+
.run(tauri::generate_context!())
101+
.expect("error while running tauri application");
102+
}
103+
```
103104

104105
2. Afterwards, all the plugin's APIs are available through the JavaScript guest bindings:
105106

@@ -117,7 +118,7 @@ Install the log plugin to get started.
117118
detach();
118119
```
119120

120-
</Steps>
121+
</Steps>
121122

122123
## Permissions
123124

src/content/docs/features/notification.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ The notification plugin is available in both JavaScript and Rust.
7979

8080
Follow these steps to send a notification:
8181

82-
<Steps>
83-
1. Check if permission is granted
82+
<Steps>
83+
1. Check if permission is granted
8484

85-
2. Request permission if not granted
85+
2. Request permission if not granted
8686

87-
3. Send the notification
88-
</Steps>
87+
3. Send the notification
88+
</Steps>
8989

9090
<Tabs>
9191
<TabItem label="JavaScript">

src/content/docs/features/persisted-scope.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ Install the persisted-scope plugin to get started.
2727
Currently manual install is required for setting up persisted-scope plugin.
2828
:::
2929

30-
<Steps>
31-
1. Install the Core plugin by adding the following to your `Cargo.toml` file:
32-
33-
```toml title="src-tauri/Cargo.toml"
34-
[dependencies]
35-
tauri-plugin-persisted-scope = "2.0.0-beta"
36-
# alternatively with Git:
37-
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
38-
```
39-
40-
2. Modify `lib.rs` to initialize the plugin:
41-
42-
```rust title="src-tauri/src/lib.rs" {3}
43-
fn run() {
44-
tauri::Builder::default()
45-
.plugin(tauri_plugin_persisted_scope::init())
46-
.run(tauri::generate_context!())
47-
.expect("error while running tauri application");
48-
}
30+
<Steps>
31+
1. Install the Core plugin by adding the following to your `Cargo.toml` file:
32+
33+
```toml title="src-tauri/Cargo.toml"
34+
[dependencies]
35+
tauri-plugin-persisted-scope = "2.0.0-beta"
36+
# alternatively with Git:
37+
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
4938
```
5039

40+
2. Modify `lib.rs` to initialize the plugin:
41+
42+
```rust title="src-tauri/src/lib.rs" {3}
43+
fn run() {
44+
tauri::Builder::default()
45+
.plugin(tauri_plugin_persisted_scope::init())
46+
.run(tauri::generate_context!())
47+
.expect("error while running tauri application");
48+
}
49+
```
50+
5151
</Steps>
5252

5353
## Usage

src/content/docs/features/single-instance.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ The plugin is already installed and initialized, and it should be functioning co
7272
The plugin `init()` method takes a closure that is invoked when a new app instance was started, but closed by the plugin.
7373
The closure has three arguments:
7474

75-
<Steps>
76-
1. **`app` :** The [AppHandle](https://docs.rs/tauri/latest/tauri/struct.AppHandle.html) of the application.
75+
<Steps>
76+
77+
1. **`app` :** The [AppHandle](https://docs.rs/tauri/latest/tauri/struct.AppHandle.html) of the application.
78+
2. **`args` :** The list of arguments, that was passed by the user to initiate this new instance.
79+
3. **`cwd` :** The Current Working Directory denotes the directory from which the new application instance was launched.
7780

78-
2. **`args` :** The list of arguments, that was passed by the user to initiate this new instance.
79-
80-
3. **`cwd` :** The Current Working Directory denotes the directory from which the new application instance was launched.
81-
</Steps>
81+
</Steps>
8282

8383
So, the closure should look like below
8484

0 commit comments

Comments
 (0)