Skip to content

✒ A hands-on introduction to Ink using annotated example programs.

License

Notifications You must be signed in to change notification settings

healeycodes/inkbyexample

Repository files navigation

CI

Ink by Example

Content and build toolchain for Ink by Example, a site that teaches Ink via annotated example programs.

All tooling is written in Ink and the programs are evaluated as part of the build process.

Syntax highlighting powered by September.


Image of https://inkbyexample.com


Add an Annotated Program

  • Add the title to examples.ink
  • Create a matching Ink program in /examples that exports intro, rows, and end.
  • A title of Foo Bar needs a program named foo-bar.ink
intro := 'The introduction precedes the code sections. It should not be left empty.'

rows := [
    {
        docs: 'A that function adds two numbers together. This text will appear on the left of the code.'
        code: 'add := (x, y) => x + y'
    },
    {
        docs: 'A function multiplies two numbers together.'
        code: 'multiply := (x, y) => x * y'
    }
]

end := 'The end section is left of the terminal output. It can be left empty.'

Contributing

Raise an issue before starting a PR. I'm happy to help out! You can also DM me on Twitter @healeycodes


Build

make build-linux or make build-mac

The website is built to /public.


Test

make test-linux or make test-mac

Check stdout for runtime errors.


Deploy

This repository uses Netlify for CI/CD and there's a netlify.toml with the configuration required.

Otherwise, serve the /public directory.


Thanks to

@thesephist for creating the Ink programming language, writing the SPEC.md and amazing documentation at https://dotink.co/ which served as a jumping off point.

Mark McGranaghan for creating the original Go by Example which provided styling and structure for this project.


License

Go by Example is copyright Mark McGranaghan and licensed under a Creative Commons Attribution 3.0 Unported License.

Everything else is licensed under MIT.

About

✒ A hands-on introduction to Ink using annotated example programs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published