-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
95 lines (66 loc) · 2.61 KB
/
doc.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
Package presenter implements parsing and rendering of present files,
which can be slide presentations as in github.com/coding-socks/presenter/cmd/present.
File Format
Present files begin with a header giving the title of the document
and other metadata, which looks like:
# Title of document
Subtitle of document
15:04 2 Jan 2006
Tags: foo, bar, baz
Summary: This is a great document you want to read.
The "#" indicates the title. Between the title and other metadata must be
no empty lines.
The date line may be written without a time:
2 Jan 2006
In this case, the time will be interpreted as 11am UTC on that date.
The tags line is a comma-separated list of tags that may be used to categorize
the document.
The summary line gives a short summary used in blog feeds.
Only the title is required;
the subtitle, date, tags, and summary lines are optional.
After the header come zero or more author blocks, like this:
Author Name
Job title, Company
<https://url/>
<@twitter_name>
The first line of the author block is conventionally the author name.
Otherwise, the author section may contain a mixture of text, twitter names, and links.
For slide presentations, only the plain text lines will be displayed on the
first slide.
If multiple author blocks are listed, each new block must be preceded
by its own blank line.
After the author blocks come the presentation slides or article sections,
which can in turn have subsections.
Each slide or section begins with "##" or "###" header line. As of now "####" or more are
handled as part of the slide content.
Markdown Syntax
Markdown typically means the generic name for a family of similar markup languages.
The specific variant used in present is CommonMark with some extensions to support
strikethrough, task list, and twitter link components.
See https://commonmark.org/help/tutorial/ for a quick tutorial.
Example:
# Title of document
Subtitle of document
15:04 2 Jan 2006
Tags: foo, bar, baz
Summary: This is a great document you want to read.
My Name
## Title of 2nd level Slide (must begin with ##)
Some Text
### Title of 3rd level Slide (must begin with ###)
More text
## Single slide (must have empty body)
### Example formatting
Formatting:
The following text formatted as _italic_, **bold**,
`code`, ~~deleted~~.
Links can have different formats as well.
[This link is labeled with text](https://example.com/),
On the other hand, the following is labeled with the link itself
<https://example.com/>. The next one is an email address <[email protected]>.
And finally, a twitter alias <@rob_pike>.
*/
package presenter