Chessboard Viewer

by Davide Aversa
5
4
3
2
1
Score: 62/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
10,578
downloads
17
forks
1,940
days
7
days
19
days
11
total PRs
1
open PRs
3
closed PRs
7
merged PRs
18
total issues
3
open issues
15
closed issues
12
commits

Latest Version

19 days ago

Changelog

v0.20.0

New

  • Add checkmate annotation icons. You can now use #W for a white checkmate icon and #B for a black checkmate icon.
  • Automatically detect and annotate checkmate moves in the PGN viewer.

Behind the Scenes

  • I reduced the size of the bundle by a whopping 70% by removing inline source maps from the production build and by minimizing the output.

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 installed 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 schema 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 a "excellent move" icon to the specified square. E.g., !e5.
  • !?<square>, adds a "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.

Not that the annotation syntax is 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 green the origin and destination squares of the move.
  • 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 the 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.

Current Limitations

This supports the full PGN specification but, for now, the feature is experimental and has limitations:

  1. At the moment, this mode do not support annotations.

Moreover, the syntax in PGN games is still unstable. I may change it in new versions.

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.

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.
Heatmap Calendar
4 years ago by Richard Slettevoll
An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Desmos
4 years ago by Nigecat
Embed graphs directly into your obsidian notes
Release Timeline
4 years ago by cakechaser
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.
Habit Tracker
4 years ago by David Moeller
A Plugin to display a Habit Tracker in Obsidian.
Dirtreeist
4 years ago by kasahala
Render a directory Structure Diagram from a markdown lists in codeblock.
D2
3 years ago by Terrastruct
The official D2 plugin for Obsidian. D2 is a modern diagram scripting language thats turns text to diagrams.
Link Exploder
3 years ago by Ben Hughes
Adamantine Pick
3 years ago by Urist McMiner
Embeddable Pikchr(https://pikchr.org) diagrams renderer plugin for Obsidian(https://obsidian.md)
Canvas Filter
3 years ago by Ivan Koshelev
Obsidian Canvas plugin that let's you show only pages / arrows with specific tags / colors / connections.
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
Chess Study
3 years ago by Christoph Lindstädt
A chess study helper and PGN viewer/editor for Obsidian.
Canvas Links
3 years ago by aqav
Show the links between "Canvas" and "File"
Lilypond
3 years ago by DOT-ASTERISK
Lilypond for Obsidian
Chemical Structure Renderer
3 years ago by xaya1001
Render chemical structures from SMILES strings into PNG or SVG format using Ketcher and Indigo Service.
Laws of Form
3 years ago by Kevin German
BattleSnake Board Viewer
3 years ago by EnderInvader
Plugin to render battlesnake boards in Obsidian
Nifty Links
3 years ago by x-Ai
Generating elegant, Notion-styled rich link cards to enhance your note-taking experience.
Show Whitespace
3 years ago by Erin Schnabel
Show leading/trailing whitespace
Desk
3 years ago by David Landry
A desk for obsidian
Note Gallery
3 years ago by Pash Shocky
A masonry note gallery for obsidian.
Storyclock Viewer
3 years ago by Jonathan Fisher
Obsidian plugin for creating a storyclock
Markline
2 years ago by 闲耘
Markline: Markdown timeline view in Obsidian.
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.
Mathematica Plot
2 years ago by Marcos Nicolau
Insert functions on Obsidian using Wolfram Mathematica!
Arrows
2 years ago by artisticat
Draw arrows across different parts of your notes, similar to on paper
Alfonso Money Manager
2 years ago by SmartLifeGPT Innovation
This is the repository for the obsidian plugin of the Alfonso Money Manager mobile application
CardNote
2 years ago by cycsd
Help you extract your thoughts more quickly in canvas
Graph Link Types
2 years ago by natefrisch01
Link types for Obsidian graph view.
Canvas Mindmap Helper
2 years ago by Tim Smart
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.
historica
2 years ago by Nhan Nguyen
Not (smart) to help you create your timeline in obsidian like a ... bro
Mehrmaid
2 years ago by huterguier
Rendering Obsidian Markdown inside Mermaid diagrams.
Mindmap
2 years ago by YunXiaoYi
An Obsidian plugin for creating Mindmaps.
Graph Banner
2 years ago by ras0q
An Obsidian plugin to display a relation graph view on the note header.
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
NyanBar
2 years ago by xhyabunny
Give life to your Obsidian notes with NyanBar !
Magic Move
2 years ago by imfenghuang
Animating Code Blocks in Obsidian
Mahjong Renderer
2 years ago by hypersphere
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.
Neo4j Graph View
6 years ago by Emile van Krieken
Chesser
5 years ago by SilentVoid
A chess plugin for obsidian
Excalidraw
5 years ago by Zsolt Viczian
A plugin to edit and view Excalidraw drawings in Obsidian
Argument Map with Argdown
5 years ago by amdecker
Habit Tracker
5 years ago by duo
This plguin for Obsidian creates a simple month view for visualizing your punch records.
Map View
5 years ago by esm
Interactive map view for Obsidian.md
WaveDrom
5 years ago by Alex Stewart
Markmind
5 years ago by Mark
A mind map, outline for obsidian,It support mobile and desktop
Lineup Builder
5 years ago by James Fallon
An Obsidian plugin that lets you build football lineups
Mapbox Location Image
2 years ago by Aaron Czichon
Render a mapbox location image based on provided coordinates
Poker Range
2 years ago by marplek
Easily create, view, and interact with poker hand ranges in your obsidian.
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
Folder Canvas
2 years ago by Nancy Lee
Generate a canvas view of your folder structure
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.
Class Relation Visualization
2 years ago by Yong
Kale Graph
2 years ago by Oli
Render mathematical graphs in Obsidian
NodeFlow
a year 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.",
Easy Timeline
a year ago by Romeliun
The Easy Timeline plugin for Obsidian allows you to create timelines easily.
Boardgame Search
a year ago by Marlon May
A plugin to create notes for boardgames based on the BGG API
ShaahMaat-md
a year ago by Mihail Kovachev
Mahgen Renderer
a year ago by Michael Francis Williams
Obsidian plugin to render mahgen automatically
Enhanced Canvas
a year ago by RobertttBS
When editing on Canvas, properties and Markdown links to notes are automatically updated, enabling backlinks in Canvas.
Every Day Calendar
a year ago by QuBe
Obsidian plugin to create calendars inspired by Simone Giertz's Every Day Calendar
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
Extended File Support
a year ago by Nick de Bruin
Adds opening and embedding support for various filetypes to 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 💪
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.
ASCII Tree Generator
a year ago by Matěj Michálek
Tier List
a year ago by Mox Alehin
Obsidian plugin for visual ranking and organizing content into customizable Tier Lists.
Export Graph View
a year ago by Sean McGhee
Plugin to export your vault's graph view.
Waveform Player
a year ago by Zhou Hua
Advanced Progress Bars
a year ago by cactuzhead
Obsidian plugin to create custom progress bars
Extended Graph
a year ago by Kapirklaa
Community plugin to add features to the graph view.
Node Factor
a year ago by CalfMoon
Customize factors effecting node size in obsidian graph.
Generate Timeline
a year ago by Shanshuimei
An obsidian plugin to generate timelines from tags, folders, files or metadata automatically. 根据标签,文件夹,文件或者属性自动生成时间轴的插件。
Timelive
a year ago by aNNiMON
Turn a list of dates into a timeline
New 3D Graph
a year ago by Aryan Gupta
Visualize your vault in 3D with a powerful, highly customizable, and filterable graph.
Maps
9 months ago by Obsidian
Map layout for Obsidian Bases. Display your notes as an interactive map view.
Tasks Map
8 months ago by NicoKNL
A graph view of your tasks.
Visited Countries
8 months ago by Ivan Peshykov
Obsidian plugin to mark and visualize the countries you've visited on an interactive world map.
Life in Weeks Calendar
7 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.
GoBoard
5 months ago by Dmitry I. Sokolov
Obsidian plugin for rendering Go game diagrams from markdown code blocks
Weather Widget
5 months ago by mr-asa
Weather widget for display in notes, Canvas, and a separate tab.
Inline Local Graph
5 months ago by TKOxff
Inline Local Graph of Obsidian
GLSL Viewer
5 months ago by iY0Yi
Preview GLSL shaders on Obsidian.
Mermaid Icons
4 months ago by toshs
Obsidian plugin enabling the use of icons in Mermaid diagrams.