Skip to content

MihailKovachev/shaahmaat-quartz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ShaahMaat-Quartz

A Quartz plugin for rendering chess positions. This plugin is a direct port of the ShaahMaat-md plugin for Obsidian.

Features

The plugin supports all features of ShaahMaat-md.

Installation

  1. Change into the quartz folder of your project.
cd quartz
  1. Install chess.js and jsdom.
npm install chess.js
npm install --save jsdom
npm install --save @types/jsdom
  1. Download the plugin archive from the latest release and extract it.

  2. Move the shaahmaat folder to quartz/quartz/plugins/transformers and add export { ShaahMaat } from "./shaahmaat/main" on a new line in index.ts.

  3. Move the shaahmaat.css file to quartz/quartz/static.

  4. Enable the plugin by adding Plugin.ShaahMaat() under transfomers under plugins in your quartz.config.ts file.

Usage

The plugin is used in exactly the same way as ShaahMaat-md.

Customisation

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.

Roadmap

  • Customisable background image for chess boards.
  • Customisable arrow size.
  • Browsing through PGN move history.
  • Display board coordinates.

Support

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published