No description
Find a file
2023-05-25 13:20:20 +02:00
.github/workflows chore: add release workflow 2023-05-17 22:45:24 +02:00
.husky chore: basic react setup 2023-05-07 13:57:40 +02:00
assets/board chore: readme, license and co. 2023-05-17 21:09:04 +02:00
imgs chore: rename to chessStudy 2023-05-18 14:43:46 +02:00
src chore: fix keys 2023-05-25 13:20:20 +02:00
storage chore: fix keys 2023-05-25 13:20:20 +02:00
.editorconfig Initial commit 2023-05-06 13:55:54 +02:00
.eslintignore Initial commit 2023-05-06 13:55:54 +02:00
.eslintrc feat: basic setup with pgn viewer, obsidian import and interactive chess board 2023-05-15 21:13:40 +02:00
.gitignore chore: add release workflow 2023-05-17 22:45:24 +02:00
.npmrc Initial commit 2023-05-06 13:55:54 +02:00
.prettierignore chore: basic react setup 2023-05-07 13:57:40 +02:00
.prettierrc chore: readme, license and co. 2023-05-17 21:09:04 +02:00
esbuild.config.mjs chore: readme, license and co. 2023-05-17 21:09:04 +02:00
LICENSE chore: GNU License Template 2023-05-18 13:08:36 +02:00
manifest.json chore: use css classes instead style props and update manifest description 2023-05-19 18:46:42 +02:00
package-lock.json chore: install immer and bump deps 2023-05-20 10:31:10 +02:00
package.json chore: install immer and bump deps 2023-05-20 10:31:10 +02:00
README.md chore: refactor display move WIP 2023-05-23 21:47:35 +02:00
rename-styles.mjs chore: readme, license and co. 2023-05-17 21:09:04 +02:00
styles.css feat: style PGN Viewer 2023-05-25 13:11:23 +02:00
tsconfig.json feat: basic setup with pgn viewer, obsidian import and interactive chess board 2023-05-15 21:13:40 +02:00
version-bump.mjs chore: readme, license and co. 2023-05-17 21:09:04 +02:00
versions.json chore: add release workflow 2023-05-17 22:45:24 +02:00

Obsidian Chess Study

A chess study helper and PGN viewer/editor for Obsidian.

With this plugin, you can either import PGNs or simply start a fresh new game. It allows you to add comments and arrows for each move, which will be persisted within a JSON File in your vault. Although it is not a full analysis board, it serves as a valuable tool to support your chess notetaking in Obsidian.

Table of contents

Motivation

I love Obsidian and its tools, but managing screenshots of chess positions is getting out of hand and is also annoying to update. It would be great to have a PGN Viewer similar to the ones offered by lichess.org or chess.com within Obsidian. It should allow us to effortlessly view PGNs, add arrows and comments, while also persisting them inside the Obsidian vault. The currently existing alternatives primarily focus on visualizing FEN snapshots, which is why this side project started.

Installation

Once you have disabled Safe Mode, you can find third-party plugins by navigating to Settings > Community Plugins > Browse and search for "Chess Study". Once you have installed the plugin, you can access it under Settings > Community Plugins. Please note that you must enable the plugin to use it. You can also unsintall the plugin from there.

Usage

To start, position your cursor where you want to place the PGN viewer/editor within your note. Execute the Obsidian command Chess Study: Insert PGN-Editor at cursor position.

This action will trigger a modal window, where you have the option to paste your PGN or leave it empty for a fresh new game. Here is what it will look like:

chess-study-modal

Once you click Submit, Obsidian Chess Study will parse the PGN, generate a new JSON file in your vault located at .obsidian/plugins/obsidian-chess-study/storage/{id}.json, and insert a chessStudy codeblock at the cursor's position. Here's an example of the chessStudy codeblock:

chess-study-codeblock

After that the PGN viewer/editor will render and you are good to go:

cchess-study-codeblock

Features

1.0.0

  • Import PGNs
  • Store game state in JSON
  • Add custom PGN viewer
  • Only allow legal moves
  • Move through the moves via navigation buttons and direct click
  • Draw and sync shapes
  • Add and sync comments with Markdown support

1.0.1

  • Add support for variants

Settings

Here are the available settings for a chessStudy code block:

Setting Possible Values Description
chessStudyId Valid nanoid Valid ID for a file stored in the plugin storage
boardOrientation white | black Orientation of the board
boardColor green | brown Color of the board

You can permanently set some settings in the Obsidian plugin settings for Obsidian Chess Study.

Roadmap

  • Add view to manage stored games
  • Add more styles
  • Add more settings

Tools Used

  • Chess visuals are powered by Chessground
  • Chess logic is powered by Chess.js
  • The markdown editor is powered by TipTap
  • Icons are provided by Lucide
  • Everything is tied together by React

Alternatives

If you want to have a look at FENs instead, check out these alternative Obsidian plugins:

License

Obsidian Chess Study is licensed under the GPL-3.0 license. Refer to LICENSE for more informations.