Skip to content

Reference

This section collects exact details, organized for lookup. If you know roughly what you are looking for, this is the place to search. If you are still deciding what to add to your app, start from Add to Your App instead.

Components

Everything you can put on a page.

  • All components: the master list, grouped by purpose, with one line about each.
  • Theme catalog: every ready-made look, with the code to apply it.

Core functions and types

The functions and types that every app relies on.

  • route: the decorator that registers a function as a route.
  • Page: the value a route returns.
  • start_server: the call that starts your app, and every option it takes.
  • Site configuration functions: set_website_title, set_website_style, set_site_information, and their relatives.

Partial updates

For apps that change part of a page instead of replacing the whole page.

  • Fragment: replace one part of the current page.
  • Update: change state without rendering anything.
  • Redirect: send the visitor to another route.

Styling and attributes

Testing

Data types

  • Data types: Picture, Photo, location types, file types, and audio types.

Everything else

  • Glossary: the words Drafter uses, in plain language.
  • Command line: flags for running drafter from a terminal.
  • Concepts: the explanations behind these details, written to be read rather than looked up.