File: tutorial-syntax.md

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (34 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Interactive Tutorials

Teach developers your Swift APIs through step-by-step, interactive content.

## Overview

Use tutorials to deliver interactive documentation for your Swift frameworks and packages. Each tutorial augments your reference documentation by guiding readers through coding exercises that show how to build apps and projects that use your APIs in realistic ways.

![A screenshot of the landing page of an example tutorial called SlothCreator. The tutorial text reads ‘Meet SlothCreator. Create, catalog, and care for sloths using SlothCreator. Get started with SlothCreator by building the demo app Slothy.’ There’s an estimated time to comlete the tutorial of 30 minutes, a ‘Get started’ button, and an illustration showing three iPhones with sloth artwork on them.](6_tutorial_toc)

You write tutorial content in Markdown, and use directives to define specific types of pages and elements, like introductions, sections, steps, and assessments. Then, you run the DocC compiler to render your tutorial in a rich, interactive learning format.

![A diagram that shows a blocked-out example of a Markdown document on that left, which contains directive syntax. On the right, a diagram shows a blocked-out example of compiled tutorial. Arrows between the two diagrams denote that the Markdown is translated into the tutorial documentation.](interactive-tutorials)

## Topics

### Essentials

- <doc:building-an-interactive-tutorial>

### Adding a Table of Contents

- ``Tutorials``

### Adding Tutorial Pages

- ``Tutorial``
- ``Article``

### Shared Syntax

- <doc:tutorial-shared-directives>

<!-- Copyright (c) 2021 Apple Inc and the Swift Project authors. All Rights Reserved. -->