{"id":16896960,"url":"https://github.com/xd009642/mdbook-chess","last_synced_at":"2025-08-16T16:47:50.313Z","repository":{"id":54114390,"uuid":"521967807","full_name":"xd009642/mdbook-chess","owner":"xd009642","description":"An mdbook preprocessing plugin to generate chess boards","archived":false,"fork":false,"pushed_at":"2023-08-11T18:35:02.000Z","size":171,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T22:38:25.533Z","etag":null,"topics":["chess","mdbook","mdbook-plugins"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xd009642.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-06T14:24:25.000Z","updated_at":"2023-12-31T22:18:21.000Z","dependencies_parsed_at":"2022-08-13T07:00:13.913Z","dependency_job_id":null,"html_url":"https://github.com/xd009642/mdbook-chess","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd009642%2Fmdbook-chess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd009642%2Fmdbook-chess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd009642%2Fmdbook-chess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xd009642%2Fmdbook-chess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xd009642","download_url":"https://codeload.github.com/xd009642/mdbook-chess/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239666606,"owners_count":19677169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","mdbook","mdbook-plugins"],"created_at":"2024-10-13T17:34:12.046Z","updated_at":"2025-02-19T13:32:31.560Z","avatar_url":"https://github.com/xd009642.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdbook-chess\n\nCreate chess boards in your mdbooks!\n\n![A chess board in starting position](./doc/demo_image.png)\n\n# Installation\n\nSimply:\n\n```\ncargo install mdbook-chess\n```\n\nAnd then add to your mdbook project as so:\n\n```\n# book.toml\n[book]\nauthors = [\"xd009642\"]\nlanguage = \"en\"\nmultilingual = false\nsrc = \"src\"\ntitle = \"mdbook-chess\"\n\n[preprocessor.chess]\n```\n\nFor an example book just look to the provided [demo-book](./demo-book).\n\n# Usage\n\nCurrently the chess boards are specified via a very simple YAML structure. With\n5 possible fields:\n\n* load - either \"start\" for the starting board or a FEN string. If not provided it's default starting board\n* save - name to save board under (can be a list)\n* moves - list of moves\n* overwrite - boolean of whether to overwrite saved version of the board with these moves\n* highlights - highlight a square on the board a list of squares\n* lines - lines and arrows from square to square (currently only straight)\n\nSo we can create a starting board like using a code block with the language set to chess. Like:\n\n\n    ```chess\n    load: start\n    ``` \n\nOr like:\n\n    ```chess\n    # mdbook seems to hate empty code blocks so have at least a blank line\n    ```\n\n_For brevity/formating the backticks and \"chess\" language specifier will be omitted\nfor future examples._\n\nOf course if we want to refer to this board later we need to save it. So we can\ncreate a board with a name to refer to it later as so:\n\n```chess\nsave: our_board\n```\n\nWe can then load it and apply some moves - this will overwrite it so to do\nalternatives can set overwrite to false and start from previous position. We\ncan also save multiple boards from a point for exploring many different routes:\n\n```chess\nload: our_board\nsave: [\"ck-main\", \"ck-2\", \"ck-3\"]\nmoves: [\"e4\", \"c6\", \"d4\", \"d5\"]\n```\n\nArrows are done by writing the two squares and the line between them, there are\ncurrently 3 styles:\n\n* `-` a line\n* `-\u003e` a single direction arrow\n* `\u003c-\u003e` a bidirectional arrow\n\nAnd we can use them as so:\n\n```chess\nload: our_board\nmoves: [\"e4\", \"c6\", \"d4\", \"d5\"]\nlines: [\"e2-\u003ee4\", \"d1\u003c-\u003eh5\", \"a4-h4\"]\n```\n\n\nGenerally, if there's a syntax error in the markdown there's a reasonable\nchance you'll see a bunch of SVG text dumped into the book. If this happens\nread the log messages and hopefully an answer will be gleaned.\n\nFor an example of all the features in use please look to the demo book!\n\n# Roadmap\n\n## Potential future features\n\nThese are features I'd be willing to do if there was demand and they were\nsufficiently easy or willing to accept PRs for.\n\n* GIF generation\n* L shaped move arrow for horsey\n* Chess.com style icons (blunder, excellent etc)\n* Styling and theming\n* More layout options in page\n* Rank and file labels\n* Flip the board\n\n## Unlikely features\n\nThese are features where they will only be added via PR but the PR may\nnot be accepted\n\n* Chess variants\n* Eval bar\n\n# License and Copyright\n\nAll chess SVGs were created by Wikimedia user Cburnett and are CC BY-SA 3.0\nlicensed. You can find them [here](https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces)\nI've edited them to template in a transform and remove the outer tags for\nease of board generation.\n\nAll other aspects of this project are currently licensed under the terms of both\nthe MIT license and the Apache License (Version 2.0). See LICENSE-MIT and\nLICENSE-APACHE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxd009642%2Fmdbook-chess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxd009642%2Fmdbook-chess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxd009642%2Fmdbook-chess/lists"}