Chessboard Viewer

by Davide Aversa
5
4
3
2
1
Score: 65/100

Description

Category: Learning & Knowledge Management

The Chessboard Viewer plugin allows users to visualize chess positions in Obsidian using FEN notation within a code block. It generates SVG-based chessboards optimized for visualization, HTML, and PDF exports, making it ideal for presenting static chess diagrams. Users can customize the board orientation, annotate with arrows and highlights, and adjust board and piece colors. The plugin focuses solely on visual representation and is not intended for interactive gameplay or PGN file handling. It provides a simple and effective way to include chess diagrams in notes.

Reviews

No reviews yet.

Stats

59
stars
11,310
downloads
17
forks
1,984
days
1
days
1
days
12
total PRs
0
open PRs
4
closed PRs
8
merged PRs
18
total issues
1
open issues
17
closed issues
12
commits

Latest Version

2 days ago

Changelog

v0.23.0

New

  • ⭐ New settings for customizing the annotation colors! Some of you told me that the default colors were hard to see with particular chessboard colors. Now, you can change the colors of the annotations to match whatever you like.

README file from

Github

Chessboard Viewer

This plugin adds the capability to visualize Chess FEN positions on an SVG chessboard directly in preview mode.

By design, this plugin is focused on visualization. It renders static SVG boards for FEN positions, supports experimental PGN rendering, and can optionally add interactive navigation controls for PGN diagrams. It is optimized for diagrams and HTML/PDF exports rather than full game analysis or editing.

If you want a more fully featured interactive chess plugin, I recommend Chesser.

How to use it

After you install the plugin, just write the FEN position representation inside a code block with the chessboard language.

Example

For example, something like this

```chessboard
fen: r2qrbk1/1bp2pp1/p2p1n1p/1p6/Pn1PP3/5N1P/1P1N1PP1/RBBQR1K1 b - - 2 17
annotations: Hf5 He5 Hd5 Ae1-e8/g Ab1-h7/g Ad4-d5
annotations: Hf6/g
```

will be rendered as in the following picture:

Change Board Orientation

Use the orientation command. It can be white (default) or black.

```chessboard
fen: r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R
orientation: black
```

Invalid Positions

Use the strict command to allow non-standard positions. This is useful for antichess or illustrating example positions.

```chessboard
fen: 8/8/8/8/8/8/8/kP6
strict: false
```

Annotations (Beta)

You can annotate your diagram with arrows, highlights and icons:

```chessboard
fen: r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R
annotations: Af8-b4 Hf8 Ha7/g !!f8 ??a7 ?e4 Fe8 !?d8
orientation: white
```

Annotation Syntax

The annotations are written in the annotations field, and you can use the following syntax:

  • A<square>-<square>, draws an arrow from the first square to the second square. E.g., Af8-b4.
  • H<square>, highlight a specific square. E.g., Hf8. If you add /g or /r or /b you can highlight the square in green, red or blue.
  • S<square>, draws a box around a square.
  • C<square>, draws a circle around a square.
  • Q<square>, draws a squircle around a square.
  • !!<square>, adds a "brilliant move" icon to the specified square. E.g., !!e5.
  • ??<square>, adds a "blunder" icon to the specified square. E.g., ??e5.
  • ?<square>, adds a "questionable move" icon to the specified square. E.g., ?e5.
  • !<square>, adds an "excellent move" icon to the specified square. E.g., !e5.
  • !?<square>, adds an "okay move" icon to the specified square. E.g., !?e5.
  • F<square>, adds a "forced move" icon to the specified square. E.g., Fe5.
  • #B<square>, adds a black "checkmated" icon to the specified square. E.g., #Be5.
  • #W<square>, adds a white "checkmated" icon to the specified square. E.g., #We5.

Note that the annotation syntax is beta and may change in the future. If you have suggestions, don't hesitate to open an issue.

Experimental: PGN

It is also possible to render games written in PGN. This is done by using the chessboard-pgn code block.

```chessboard-pgn
[Event "Casual Game"]
[Site "Berlin GER"]
[Date "1852.??.??"]
[EventDate "?"]
[Round "?"]
[Result "1-0"]
[White "Adolf Anderssen"]
[Black "Jean Dufresne"]
[ECO "C52"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "47"]

1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.b4 Bxb4 5.c3 Ba5 6.d4 exd4 7.O-O
d3 8.Qb3 Qf6 9.e5 Qg6 10.Re1 Nge7 11.Ba3 b5 12.Qxb5 Rb8 13.Qa4
Bb6 14.Nbd2 Bb7 15.Ne4 Qf5 16.Bxd3 Qh5 17.Nf6+ gxf6 18.exf6
Rg8 19.Rad1 Qxf3 20.Rxe7+ Nxe7 21.Qxd7+ Kxd7 22.Bf5+ Ke8
23.Bd7+ Kf8 24.Bxe7# 1-0
```

Select Game Position

It is also possible to specify which ply (half-move) to render in the diagram. You can do that by using the ply property. In the following example, we will render the 10th ply (that is, after black moves Ba5 on move 5).

```chessboard-pgn
ply: 10
show-move: squares
[Event "Casual Game"]
[Site "Berlin GER"]
[Date "1852.??.??"]
[EventDate "?"]
[Round "?"]
[Result "1-0"]
[White "Adolf Anderssen"]
[Black "Jean Dufresne"]
[ECO "C52"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "47"]

1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.b4 Bxb4 5.c3 Ba5 6.d4 exd4 7.O-O
d3 8.Qb3 Qf6 9.e5 Qg6 10.Re1 Nge7 11.Ba3 b5 12.Qxb5 Rb8 13.Qa4
Bb6 14.Nbd2 Bb7 15.Ne4 Qf5 16.Bxd3 Qh5 17.Nf6+ gxf6 18.exf6
Rg8 19.Rad1 Qxf3 20.Rxe7+ Nxe7 21.Qxd7+ Kxd7 22.Bf5+ Ke8
23.Bd7+ Kf8 24.Bxe7# 1-0
```

It is also possible to highlight the ply. By using show-move you can select the style:

  • squares: it highlights the origin and destination squares of the move in green.
  • arrow: it draws an arrow from the origin to the destination square of the move.
  • none: no highlighting (default).

Interactive Mode

It is possible to specify a PGN diagram as interactive by using the interactive: true option. If a diagram is interactive, the plugin will show buttons to go to the previous or next move (or the first and last).

You can also add move-list: true to show a move list next to the board (SAN in two columns, one full move per row). Click any half-move to jump there; the current position is highlighted. On small widths the list wraps below the board. If you set move-list: true without interactive: true, the plugin enables interactive mode for you so navigation and the list stay in sync.

Annotations in PGN Mode

PGN diagrams support the same annotations: syntax as FEN boards (see Annotations above). Annotations are displayed only at the target ply: the value of ply: if specified, or the last move in the game if ply: is omitted. In interactive mode, annotations appear when the board is at the target ply and disappear when you navigate away.

```chessboard-pgn
ply: 12
annotations: Ac7-c5/r Hc7/g Hc5/g !c5 Ag7-g6
1.d4 d5 2.Nc3 Nf6 3.Bf4 g6 4.e3 Bg7 5.Nf3 O-O 6.Be2 c5
```

If I find a viable syntax, I'd also like to implement annotations for multiple moves as well.

Current Limitations

This supports the full PGN specification but, for now, the feature is experimental. The syntax in PGN games is still unstable and may change in new versions.

How to compile the plugin

First, install the dependencies with

npm i

Then, you can compile the plugin with:

npm run build

This will create a main.js file in the project root. That is the entry point of the plugin.

Planned Features

  • Chessboard color customization.
  • Pieces color customization.
  • Chessboard annotation and highlights.
  • Custom annotation shapes.

Chess Pieces

The SVG pieces were made by jurgenwesterhof (adapted from work of Cburnett), CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0, via Wikimedia Commons.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced Canvas
2 years ago by Developer-Mike
⚡ Supercharge your canvas experience! Graph view integration and unlimited styling options empower flowcharts, dynamic presentations, and interconnected knowledge.
Markmind
5 years ago by Mark
A mind map, outline for obsidian,It support mobile and desktop
Heatmap Calendar
4 years ago by Richard Slettevoll
An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Map View
5 years ago by esm
Interactive map view for Obsidian.md
Extended Graph
a year ago by Kapirklaa
Community plugin to add features to the graph view.
Contribution Graph
2 years ago by vran
generate interactive gitxxx style contribution graph for obsidian, use it to track your goals, habits, or anything else you want to track.
Maps
10 months ago by Obsidian
Map layout for Obsidian Bases. Display your notes as an interactive map view.
Diagrams.Net
4 years ago by Jens M Gleditsch
This repository contains a plugin for Obsidian for inserting and editing diagrams.net (previously draw.io) diagrams.
Heatmap Tracker
2 years ago by Maksim Rubanau
A customizable heatmap tracker plugin for Obsidian to visualize daily data trends with intuitive navigation and flexible settings.
Note Gallery
3 years ago by Pash Shocky
A masonry note gallery for obsidian.
Mehrmaid
2 years ago by huterguier
Rendering Obsidian Markdown inside Mermaid diagrams.
Smart Connections Visualizer
2 years ago by Evan Moscoso
Visualize your notes and see links to related content with AI embeddings. Use local models or 100+ via APIs like Claude, Gemini, ChatGPT & Llama 3
Link Exploder
4 years ago by Ben Hughes
Desmos
4 years ago by Nigecat
Embed graphs directly into your obsidian notes
InfraNodus AI Graph View
2 years ago by Nodus Labs
Advanced graph view for Obsidian: text analysis, topic modeling, and AI with InfraNodus AI text analysis tool: https://infranodus.com
Optimize Canvas Connections
3 years ago by Félix Chénier
An Obsidian plugin that declutters a canvas by reconnecting notes using their nearest edges
Graph Banner
2 years ago by ras0q
An Obsidian plugin to display a relation graph view on the note header.
Enhanced Canvas
a year ago by RobertttBS
When editing on Canvas, properties and Markdown links to notes are automatically updated, enabling backlinks in Canvas.
Habit Tracker
5 years ago by duo
This plguin for Obsidian creates a simple month view for visualizing your punch records.
D2
4 years ago by Terrastruct
The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.
Mindmap
2 years ago by YunXiaoYi
An Obsidian plugin for creating Mindmaps.
Canvas Links
3 years ago by aqav
Show the links between "Canvas" and "File"
Show Whitespace
3 years ago by Erin Schnabel
Show leading/trailing whitespace
New 3D Graph
a year ago by Aryan Gupta
Visualize your vault in 3D with a powerful, highly customizable, and filterable graph.
Canvas Filter
3 years ago by Ivan Koshelev
Obsidian Canvas plugin that let's you show only pages / arrows with specific tags / colors / connections.
CardNote
2 years ago by cycsd
Help you extract your thoughts more quickly in canvas
Advanced Progress Bars
a year ago by cactuzhead
Obsidian plugin to create custom progress bars
Chesser
5 years ago by SilentVoid
A chess plugin for obsidian
Graph Link Types
2 years ago by natefrisch01
Link types for Obsidian graph view.
Tasks Map
10 months ago by NicoKNL
A graph view of your tasks.
Neo4j Graph View
6 years ago by Emile van Krieken
Release Timeline
4 years ago by cakechaser
Habit Tracker
4 years ago by David Moeller
A Plugin to display a Habit Tracker in Obsidian.
Canvas Mindmap Helper
2 years ago by Tim Smart
Nifty Links
3 years ago by x-Ai
Generating elegant, Notion-styled rich link cards to enhance your note-taking experience.
Export Graph View
a year ago by Sean McGhee
Plugin to export your vault's graph view.
Arrows
2 years ago by artisticat
Draw arrows across different parts of your notes, similar to on paper
Argument Map with Argdown
5 years ago by amdecker
Dirtreeist
4 years ago by kasahala
Render a directory Structure Diagram from a markdown lists in codeblock.
Chess Study
3 years ago by Christoph Lindstädt
A chess study helper and PGN viewer/editor for Obsidian.
Content Cards
a year ago by leo
Insert content cards in Markdown, such as timeline, highlightblock, target card, book information card, music information card, movie information card, photoes ablum, business card, content subfield, countdown, SWOT,BCG.
Chemical Structure Renderer
3 years ago by xaya1001
Render chemical structures from SMILES strings into PNG or SVG format using Ketcher and Indigo Service.
WaveDrom
5 years ago by Alex Stewart
Adamantine Pick
4 years ago by Urist McMiner
Embeddable Pikchr(https://pikchr.org) diagrams renderer plugin for Obsidian(https://obsidian.md)
Node Factor
a year ago by CalfMoon
Customize factors effecting node size in obsidian graph.
Lilypond
3 years ago by DOT-ASTERISK
Lilypond for Obsidian
YourPulse - Your Writing Activity Visualised
a year ago by Jiri Sifalda
YourPulse.cc - Obsidian.md plugin that turns your vault into a reflection of your creativity, and put your writing on steroids 💪
Desk
3 years ago by David Landry
A desk for obsidian
Flowcharts
a year ago by land0r
Flowchart Plugin for Obsidian – Create and customize flowcharts seamlessly within your Obsidian vault. Powered by Flowchart.js and designed for productivity
Lineup Builder
5 years ago by James Fallon
An Obsidian plugin that lets you build football lineups
Laws of Form
3 years ago by Kevin German
ASCII Tree Generator
a year ago by Matěj Michálek
Easy Timeline
2 years ago by Romeliun
The Easy Timeline plugin for Obsidian allows you to create timelines easily.
Generate Timeline
a year ago by Shanshuimei
An obsidian plugin to generate timelines from tags, folders, files or metadata automatically. 根据标签,文件夹,文件或者属性自动生成时间轴的插件。
Tier List
a year ago by Mox Alehin
Obsidian plugin for visual ranking and organizing content into customizable Tier Lists.
Storyclock Viewer
3 years ago by Jonathan Fisher
Obsidian plugin for creating a storyclock
Folder Canvas
2 years ago by Nancy Lee
Generate a canvas view of your folder structure
Mermaid Icons
6 months ago by toshs
Obsidian plugin enabling the use of icons in Mermaid diagrams.
BattleSnake Board Viewer
3 years ago by EnderInvader
Plugin to render battlesnake boards in Obsidian
Mathematica Plot
2 years ago by Marcos Nicolau
Insert functions on Obsidian using Wolfram Mathematica!
Markline
2 years ago by 闲耘
Markline: Markdown timeline view in Obsidian.
Extended File Support
a year ago by Nick de Bruin
Adds opening and embedding support for various filetypes to Obsidian
Alfonso Money Manager
2 years ago by SmartLifeGPT Innovation
This is the repository for the obsidian plugin of the Alfonso Money Manager mobile application
Weather Widget
6 months ago by mr-asa
Weather widget for display in notes, Canvas, and a separate tab.
Mapbox Location Image
2 years ago by Aaron Czichon
Render a mapbox location image based on provided coordinates
Canvas Explorer
2 years ago by Henri Jamet
A plugin that enables users to explore their vault by iteratively adding or ignoring linked notes, ultimately generating a customizable canvas that visually represents the preserved notes and their connections.
Magic Move
2 years ago by imfenghuang
Animating Code Blocks in Obsidian
NodeFlow
2 years ago by LincZero
Render node streams like `ComfyUi`, `UE`, `Houdini`, `Blender`, etc., to make it easy to write relevant notes. json describes the chart, compared to screenshots, making it easier to modify later. The plugin is also compatible with blogs.",
Waveform Player
a year ago by Zhou Hua
Inline Local Graph
6 months ago by TKOxff
Inline Local Graph of Obsidian
Life in Weeks Calendar
9 months ago by Jeff Szuc
Plugin for the Obsidian markdown editor. Displays a calendar of your life in weeks with weekly Periodic Notes plugin integration. Includes options for the traditional Memento Mori/Stoic style calendar, as well as a Gregorian calendar accurate version.
Boardgame Search
2 years ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
Every Day Calendar
a year ago by QuBe
Obsidian plugin to create calendars inspired by Simone Giertz's Every Day Calendar
Timelive
a year ago by aNNiMON
Turn a list of dates into a timeline
NyanBar
2 years ago by xhyabunny
Give life to your Obsidian notes with NyanBar !
Visited Countries
10 months ago by Ivan Peshykov
Obsidian plugin to mark and visualize the countries you've visited on an interactive world map.
Kale Graph
2 years ago by Oli
Render mathematical graphs in Obsidian
GLSL Viewer
6 months ago by iY0Yi
Preview GLSL shaders on Obsidian.
Poker Range
2 years ago by marplek
Easily create, view, and interact with poker hand ranges in your obsidian.
Class Relation Visualization
2 years ago by Yong
ShaahMaat-md
2 years ago by Mihail Kovachev
Mahgen Renderer
2 years ago by Michael Francis Williams
Obsidian plugin to render mahgen automatically
GoBoard
7 months ago by Dmitry I. Sokolov
Obsidian plugin for rendering Go game diagrams from markdown code blocks
Mahjong Renderer
2 years ago by hypersphere