Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,25 @@ Available attributes:
- `class`: CSS classes to apply
- `style`: CSS inline styles to apply

#### Icons

If a web interface uses icons, especially as buttons without labels, use
the `icon` shortcode to inline an SVG file for a visual reference as
demonstrated below:

```markdown
Select all nodes ({{< icon "select-all" >}}), then right-click.
```

Icons are supposed to supplement the text, i.e. not be embedded in sentences.
They are hidden from screen readers.

To add new icons to the toolchain, save them to `site/content/images/icons/`.
They are referenced by file name (without extension) in the shortcode.

SVG icon files should not define the attributes `width`, `height`, `aria-hidden`,
and `focusable` on the `<svg>` tag.

#### Keyboard shortcuts

To document hotkeys and key combinations to press in a terminal or graphical
Expand Down
202 changes: 137 additions & 65 deletions site/content/3.12/graphs/graph-visualizer.md

Large diffs are not rendered by default.

202 changes: 137 additions & 65 deletions site/content/3.13/graphs/graph-visualizer.md

Large diffs are not rendered by default.

Binary file modified site/content/images/graph-visualizer-add-nodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer-create-edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer-customization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer-menu-canvas-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer-node-properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer-queries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/content/images/graph-visualizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/caret-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/caret-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/clear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/duplicate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/edit-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/fit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/rerun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/reset-all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/run.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/save.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/select-all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions site/content/images/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/sort-by.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/swap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/content/images/icons/zoom-in.svg
1 change: 1 addition & 0 deletions site/content/images/icons/zoom-out.svg
10 changes: 10 additions & 0 deletions site/themes/arangodb-docs-theme/layouts/shortcodes/icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<span class="inline-icon" aria-hidden="true">
{{- $iconName := .Get 0 }}
{{- $iconPath := printf "/images/icons/%s.svg" $iconName }}
{{- $iconSvg := readFile $iconPath }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Icon Shortcode Path Mismatch

The icon shortcode constructs icon paths as /images/icons/NAME.svg for readFile. However, readFile interprets paths starting with / relative to the project root, meaning it looks in PROJECT_ROOT/images/icons/. This path doesn't match the actual icon file location in site/content/images/icons/, causing icons to be unfound and triggering an error.

Fix in Cursor Fix in Web

Copy link
Contributor Author

@Simran-B Simran-B Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works and is also correct according to the Hugo docs:

The os.ReadFile function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the contentDir. A leading path separator (/) is optional.

https://gohugo.io/functions/os/readfile/

We can change it to "site/content/images/icons/%s.svg" though.

{{- if $iconSvg }}
{{- $iconSvg | safeHTML }}
{{- else }}
{{- errorf "Icon '%v' not found for '%v'" $iconName .Page.File.Path }}
{{- end -}}
</span>
13 changes: 13 additions & 0 deletions site/themes/arangodb-docs-theme/static/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,19 @@ img {
margin-bottom: 20px;
}

.inline-icon {
display: inline-block;
width: var(--TYPOGRAPHY-BODY-TEXT);
height: var(--TYPOGRAPHY-BODY-TEXT);
margin: 0 .1rem;
position: relative;
top: .2rem;
}

.inline-icon svg {
margin: 0;
}

/* end Images */

/* Tables */
Expand Down