crystal-by-example
Version, currently master branch1 version
- master branchlatestFeb 15, 2020
github.com/dscottboggs/crystal-by-example
A collection of examples intended to show how to use Crystal. Based on the Go By Example site.
Installation
# Add this to your shard.yml
dependencies:
crystal-by-example:
github: dscottboggs/crystal-by-example
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.31.1- License
- MIT
- Author
- Scott Boggs
- Target
crystal-by-examplefrom src/crystal-by-example.cr
Dependencies
Runtime Dependencies
- markd*github: icyleaf/markd
README
Crystal By Example
A collection of examples intended to show how to use Crystal. Based on Mark McGranaghan's Go By Example site.
Check it out at crystalbyexample.tams.tech
Dependencies
- Crystal (if compiling the renderer or generate-hash script)
- Python3 and python-pygments for syntax highlighting.
Development
Examples are placed in src/examples/{example name}/{example name}.cr. Shell commands can also be demonstrated by placin them in a file at src/examples/{example name}/{example name}.sh. Comments are formatted with markdown and presented to the left of the block of code they immediately preceed.
Once your example is written, it needs to be rendered:
- run
./generate-hash-file {example name} - add your example's name to examples.txt
- run
./crystal-by-example
Your example will now be among the other rendered HTML files in public.
Contributing
- Fork it (https://github.com/dscottboggs/crystal-by-example/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Scott Boggs - creator and maintainer
License
This project is based on the Go By Example site by Mark McGranaghan, which is licensed under a Creative Commons Attribution 3.0 Unported License, and as such carries the same license.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 15, 2020
- Crystal
0.31.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/dscottboggs/crystal-by-example
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1