Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Mar 30, 2024
1 parent 64212d2 commit 806ec71
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/docs/usage/raw-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "Using Raw Mode"
tags:
- usage
---

# Raw Mode
Setting a codeblock to run in `raw mode` is a unique feature introduced in [v1.6.0](../changelog.md#160-march-29-2024--id160).

It allows you to display a gist in a web-browser environment instead of as a simple codeblock. This is useful for gists which include mermaid graphs.

Github has configured gists to require numerous javascript files in order to navigate the graph and view the data; which cannot be obtained through conventional methods that are used for normal codeblocks / text. Whereas raw mode allows for these javascript files to be loaded locally in your Obsidian notes.

!!! note annotate "Website Support"

`Raw Mode` was specially developed as a way to display gists with mermaid graphs; however, raw mode will actually work for any website on the internet being displayed.

<br />

## Cookies & Sign-in
Raw mode allows you to view a full version of the specified website; which means you also have the option to sign into websites such as Github just as you would in a normal browser. This gives you access to not only view your gists, but also edit them, as well as view any other content available on Github or your Opengist website.

<br />

## Enabling Raw Mode
To switch your codeblock from a normal text codeblock over to raw mode; you must structure your codeblock in the following manner:

````
```gistr
url: https://gist.github.com/Aetherinox/f7525990fba2cba6a3ee7b61ac626c21
raw: true
zoom: 0.8
height: 500
```
````

<br />

## Additional Properties
Along with specifying `raw`, you also have access to the properties:

- `zoom`
- `height`

<br />

| Property | Description |
| --- | --- |
| [zoom](../usage/properties.md#property-zoom) | _**(Raw Mode Only)**_: Determines how big the content and text will appear in the gist window. Default value: `1`. 50% would be `0.5`|
| [height](../usage/properties.md#property-height) | _**(Raw Mode Only)**_: Specify the height of the window when displaying a gist. |

<br />

Detailed information on these properties can be found on the [Properties](../usage/properties.md) page.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ nav:
- Usage:
- Basic: 'usage/basic.md'
- Properties: 'usage/properties.md'
- Raw Mode: 'usage/raw-mode.md'
- Settings:
- Summary: 'settings/summary.md'
- Global: 'settings/global.md'
Expand Down

0 comments on commit 806ec71

Please sign in to comment.