Skip to content

Commit

Permalink
docs: switch from Docusaurus to Obsidian Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Jul 13, 2024
1 parent 03e7005 commit 7d2ad11
Show file tree
Hide file tree
Showing 65 changed files with 187 additions and 14,843 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Obsidian Advanced URI
# Advanced URI

A plugin for [Obsidian](https://obsidian.md)

[Documentation](https://vinzent03.github.io/obsidian-advanced-uri)
[Documentation](https://publish.obsidian.md/advanced-uri-doc)

## Overview

[Obsidian Advanced URI](https://github.com/Vinzent03/obsidian-advanced-uri) allows you to control many different features in Obsidian just by opening some URIs. Because they are just text and don't require any mouse clicks or keyboard inputs, they are perfect to automate your Obsidian workflow.
[Advanced URI](https://github.com/Vinzent03/obsidian-advanced-uri) allows you to control many different features in Obsidian just by opening some URIs. Because they are just text and don't require any mouse clicks or keyboard inputs, they are perfect to automate your Obsidian workflow.

You can for example
- [open files](https://vinzent03.github.io/obsidian-advanced-uri/actions/navigation)
- [edit files](https://vinzent03.github.io/obsidian-advanced-uri/actions/writing)
- [create files](https://vinzent03.github.io/obsidian-advanced-uri/actions/writing)
- [open workspaces](https://vinzent03.github.io/obsidian-advanced-uri/actions/navigation)
- [open bookmarks](https://vinzent03.github.io/obsidian-advanced-uri/actions/bookmarks)
- [navigate to headings/blocks](https://vinzent03.github.io/obsidian-advanced-uri/actions/navigation)
- [automated search and replace in a file](https://vinzent03.github.io/obsidian-advanced-uri/actions/search)
- [call commands](https://vinzent03.github.io/obsidian-advanced-uri/actions/commands)
- [edit and read from frontmatter](https://vinzent03.github.io/obsidian-advanced-uri/actions/frontmatter)
- [open files](https://publish.obsidian.md/advanced-uri-doc/Actions/Navigation)
- [edit files](https://publish.obsidian.md/advanced-uri-doc/Actions/Writing)
- [create files](https://publish.obsidian.md/advanced-uri-doc/Actions/Writing)
- [open workspaces](https://publish.obsidian.md/advanced-uri-doc/Actions/Navigation)
- [open bookmarks](https://publish.obsidian.md/advanced-uri-doc/Actions/Bookmarks)
- [navigate to headings/blocks](https://publish.obsidian.md/advanced-uri-doc/Actions/Navigation)
- [automated search and replace in a file](https://publish.obsidian.md/advanced-uri-doc/Actions/Search)
- [call commands](https://publish.obsidian.md/advanced-uri-doc/Actions/Commands)
- [edit and read from frontmatter](https://publish.obsidian.md/advanced-uri-doc/actions/frontmatter)
- and much more

Please read the [documentation](https://vinzent03.github.io/obsidian-advanced-uri) for a detailed explanation.
Please read the [documentation](https://publish.obsidian.md/advanced-uri-doc) for a detailed explanation.

## Examples

Expand Down
21 changes: 1 addition & 20 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.obsidian
5 changes: 5 additions & 0 deletions docs/Actions/Actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Actions are combinations of different parameters.
For example if you pass a file path and content, it writes the content to the file.

> [!note]
> The `<identification>` key should be replaced by your chosen identification as described in [File Identifiers](File%20identifiers.md)
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
---
sidebar_position: 5
---

# Bookmarks

Open any bookmarked search, folder or file. Anything you can bookmark in Obsidian via an URI.

| / | parameters | explanation |
| ------------- | ---------------------- | ----------------------------- |
| Open bookmark | bookmark | Opens bookmark with title `bookmark` in current tab |
| Open bookmark | bookmark, openmode=tab | Opens bookmark with title `bookmark` in a new tab |

For more openmodes, see [open mode](../concepts/navigation_parameters.md#open-mode).
For more openmodes, see [open mode](Navigation%20Parameters.md#open-mode).


:::note Example
```uri
obsidian://advanced-uri?vault=<your-vault>&bookmark=<your-bookmark-title>&openmode=tab
```
:::
> [!example]
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&bookmark=<your-bookmark-title>&openmode=tab
> ```
28 changes: 10 additions & 18 deletions docs/docs/actions/commands.md → docs/Actions/Commands.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
---
sidebar_position: 3
---

# Commands

There are two ways to identify a command.
- `commandname` That's the one you see when searching in Obsidian's command palette
- `commandid` That's invisible to the user, but can be read from the plugin's source code

:::info
Using the command's ID is strongly recommended, because it's not likely to change. Using [Helper Commands](../tips/helper_commands.md) the ID is automatically obtained.
:::
> [!note]
> Using the command's ID is strongly recommended, because it's not likely to change. Using [Helper Commands](Helper%20Commands.md) the ID is automatically obtained.
In the following `<command>` can be replaced with either `commandname` or `commandid`.

Expand All @@ -24,13 +17,12 @@ In the following `<command>` can be replaced with either `commandname` or `comma
| <command\>, <identification\>, mode=overwrite | Opens file, clears the file, then executes command by its name |


:::note Example

Close specific tab by its filepath:
```uri
obsidian://advanced-uri?vault=<your-vault>&filepath=<your-file>&commandid=workspace%253Aclose
```

To explain this example: It first switches to the tab specified by `filepath` and then executes the command `Close current tab` by its ID. Resulting in the ability to close any tab by its filepath.
:::
> [!example]
>
> Close specific tab by its filepath:
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&filepath=<your-file>&commandid=workspace%253Aclose
> ```
>
> To explain this example: It first switches to the tab specified by `filepath` and then executes the command `Close current tab` by its ID. Resulting in the ability to close any tab by its filepath.
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
sidebar_position: 7
---

# Frontmatter

The frontmatter of a file is the metadata at the beginning of a file. It is usually written in YAML format and is enclosed by `---`.

```yaml
Expand Down Expand Up @@ -42,7 +36,7 @@ To select `B` use `frontmatterkey=[my_item,second_item,1]`, because `B` is at in

## Read Frontmatter

You can copy values of your frontmatter to the clipboard using a [file identifier](../concepts/file_identifiers.md) and the `frontmatterkey` paramteter.
You can copy values of your frontmatter to the clipboard using a [file identifier](File%20identifiers.md) and the `frontmatterkey` paramteter.

**Complete example:**
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
sidebar_position: 8
---

# Miscellaneous
| / | parameters | explanation |
| ---------------------- | ------------------------------ | -------------------------------------------------------------------------- |
| Exists | <identification\>, exists=true | Copies `1` to clipboard if file exists, `0` if not. |
Expand Down
68 changes: 30 additions & 38 deletions docs/docs/actions/navigation.md → docs/Actions/Navigation.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
---
sidebar_position: 1
---

# Navigation

:::tip
Use the [view mode](../concepts/navigation_parameters.md#view-mode) parameter to e.g. switch between reading and live preview mode.
:::

:::tip
Use the [open mode](../concepts/navigation_parameters.md#open-mode) parameter to open the file always in a new tab or in a new window.
:::
> [!tip]
> Use the [view mode](Navigation%20Parameters.md#view-mode) parameter to e.g. switch between reading and live preview mode.
>
> [!tip]
> Use the [open mode](Navigation%20Parameters.md#open-mode) parameter to open the file always in a new tab or in a new window.
>
| / | parameters | explanation |
| ---------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -22,29 +15,28 @@ Use the [open mode](../concepts/navigation_parameters.md#open-mode) parameter to
| heading in file | <identification\>, heading | Opens the `heading` in file |
| block reference in file | <identification\>, block | Opens the `block` in file |
| global block reference | block | Searches the whole vault for that block id and uses that file for <identification\> |
| settings tab | settingid | Opens a settings tab by id, all plugins are supported. See [here](settings_navigation.md) for a list of all available options |


:::note Example

Open **workspace** "main":
```uri
obsidian://advanced-uri?vault=<your-vault>&workspace=main
```
Open **heading** "Goal" in "my-file.md" (**Important:** Without syntax, only `Goal`):
```uri
obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&heading=Goal
```

Open **block**-id "12345" in "my-file.md" (**Important:** Without syntax, only `12345`):
```uri
obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&block=12345
```

Searches whole vault for **block**-id "12345". Ideally that block id is unique. (**Important:** Without syntax, only `12345`):
```uri
obsidian://advanced-uri?vault=<your-vault>&block=12345
```

:::
| settings tab | settingid | Opens a settings tab by id, all plugins are supported. See [here](Settings%20navigation.md) for a list of all available options |


> [!example]
>
> Open **workspace** "main":
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&workspace=main
> ```
> Open **heading** "Goal" in "my-file.md" (**Important:** Without syntax, only `Goal`):
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&heading=Goal
> ```
>
> Open **block**-id "12345" in "my-file.md" (**Important:** Without syntax, only `12345`):
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&block=12345
> ```
>
> Searches whole vault for **block**-id "12345". Ideally that block id is unique. (**Important:** Without syntax, only `12345`):
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&block=12345
> ```
>
6 changes: 0 additions & 6 deletions docs/docs/actions/search.md → docs/Actions/Search.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
sidebar_position: 4
---

# Search

## Per File Search

| / | parameters | explanation |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
sidebar_position: 6
---

# Settings Navigation


:::info
The settings tab of every community plugin can be opened by the plugin's id. The id can be found in `<your-vault>/.obsidian/plugins/<your-plugin>/manifest.json`.
:::
> [!note]
> The settings tab of every community plugin can be opened by the plugin's id. The id can be found in `<your-vault>/.obsidian/plugins/<your-plugin>/manifest.json`.
>
## Obsidian settings

Expand Down Expand Up @@ -47,20 +40,18 @@ The settings tab of every community plugin can be opened by the plugin's id. The
In addition to navigating to a specific setting, you can also navigate to a specific section of a setting. This is useful if you want to open a specific setting and have it scrolled into view. Use the additional `settingsection` parameter for this purpose. The parameter's value is the exact case-sensitive section name.


:::note Example for Obsidian Settings
```uri
obsidian://advanced-uri?vault=<your-vault>&settingid=editor
```
```uri
obsidian://advanced-uri?vault=<your-vault>&settingid=editor&settingsection=Behavior
```
> [!example] Example for Obsidian Settings
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&settingid=editor
> ```
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&settingid=editor&settingsection=Behavior
> ```
:::note Example for Community Plugins Options Page
```uri
obsidian://advanced-uri?vault=Manifold-Grace&settingid=<community plugin id>
```
:::
> [!example] Example for Community Plugins Options Page
> ```uri
> obsidian://advanced-uri?vault=Manifold-Grace&settingid=<community plugin id>
> ```
:::note Source
Thanks to [hyaray](https://github.com/hyaray) for collecting all setting ids on the [Obsidian forum](https://forum-zh.obsidian.md/t/topic/7365)
:::
> [!note] Source
> Thanks to [hyaray](https://github.com/hyaray) for collecting all setting ids on the [Obsidian forum](https://forum-zh.obsidian.md/t/topic/7365)
70 changes: 29 additions & 41 deletions docs/docs/actions/writing.md → docs/Actions/Writing.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
---
sidebar_position: 2
---
> [!caution]
> Make sure your values are properly [encoded](Concepts/Encoding.md)
>
# Writing

:::caution
Make sure your values are properly [encoded](../concepts/encoding.md)
:::

:::info
The `data` parameter can be replaced with `clipboard=true` to get the content from the clipboard.
:::
> [!info]
> The `data` parameter can be replaced with `clipboard=true` to get the content from the clipboard.
>
| / | parameters | explanation |
| --------- | --------------------------------------- | ----------------------------------------------------------------------------------------------- |
Expand All @@ -20,32 +14,26 @@ The `data` parameter can be replaced with `clipboard=true` to get the content fr
| prepend | <identification\>, data, mode=prepend | Only prepends `data` to the file |
| new | filepath, data, mode=new | Definitely creates a new file. If `filepath` already exists, an incrementing number is appended |

:::note Example
**Write** "Hello World" to "my-file.md":

```uri
obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&data=Hello%2520World
```

**Overwrite** "This text is overwritten" to "my-file.md":

```uri
obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&data=This%2520text%2520is%2520overwritten&mode=overwrite
```

**Append** "Hello World" to today's **daily note**:

```uri
obsidian://advanced-uri?vault=<your-vault>&daily=true&data=Hello%2520World&mode=append
```

**Append** content from the **clipboard** to today's **daily note**:

```uri
obsidian://advanced-uri?vault=<your-vault>&daily=true&clipboard=true&mode=append
```

:::

:::info
You may use the `heading` or `line` parameter to append and prepend data to a heading or line. More information in [Navigation](navigation.md)
> [!example]
> **Write** "Hello World" to "my-file.md":
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&data=Hello%2520World
> ```
>
> **Overwrite** "This text is overwritten" to "my-file.md":
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&data=This%2520text%2520is%2520overwritten&mode=overwrite
> ```
>
> **Append** "Hello World" to today's **daily note**:
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&daily=true&data=Hello%2520World&mode=append
> ```
>
> **Append** content from the **clipboard** to today's **daily note**:
> ```uri
> obsidian://advanced-uri?vault=<your-vault>&daily=true&clipboard=true&mode=append
> ```
> [!note]
You may use the `heading` or `line` parameter to append and prepend data to a heading or line. More information in [Navigation](Actions/Navigation)
6 changes: 0 additions & 6 deletions docs/docs/concepts/encoding.md → docs/Concepts/Encoding.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
---
sidebar_position: 2
---

# Encoding

Special characters like `?` and spaces need to be encoded. There are many online encoders. An example is [this tool](https://www.urlencoder.io/). Simply enter the value of your parameters and use the encoded one.

Some encoding examples:
Expand Down
Loading

0 comments on commit 7d2ad11

Please sign in to comment.