A Quartz plugin for rendering chess positions. This plugin is a direct port of the ShaahMaat-md plugin for Obsidian.
The plugin supports all features of ShaahMaat-md.
- Change into the
quartz
folder of your project.
cd quartz
npm install chess.js
npm install --save jsdom
npm install --save @types/jsdom
-
Download the plugin archive from the latest release and extract it.
-
Move the
shaahmaat
folder toquartz/quartz/plugins/transformers
and addexport { ShaahMaat } from "./shaahmaat/main"
on a new line inindex.ts
. -
Move the
shaahmaat.css
file toquartz/quartz/static
. -
Enable the plugin by adding
Plugin.ShaahMaat()
undertransfomers
underplugins
in yourquartz.config.ts
file.
The plugin is used in exactly the same way as ShaahMaat-md.
By changing the settings of the plugin, you can customise the colours used for board squares, highlights and arrows. You can also select what chess set should be used for the pieces.
Adding custom chess sets is possible by modifying the shaahmaat.css
file. You need to add each of the set's pieces in the following way:
.shaahmaat-chess-piece.SETNAME-chess-set.PIECE.COLOR {background-image:url('data:image/svg+xml;base64,PIECEDATA')}
SETNAME
should be the name of your chess set. PIECE
is the name of the piece - one of king
, queen
, bishop
, knight
, rook
, pawn
. COLOR
is the color of the piece - either white
or black
. PIECEDATA
is the base64-encoded SVG image you want to use for your piece. Take a look at styles.css
for a clearer example.
- Customisable background image for chess boards.
- Customisable arrow size.
- Browsing through PGN move history.
- Display board coordinates.
If you encounter any bugs, open an issue on the Github repository. Other contributions are also welcome.
ShaahMaat-md would not be possible without chessjs, jsdom and cburnett's chess pieces.