deck is a tool for creating deck using Markdown and Google Slides.
deck is a tool for creating deck using Markdown and Google Slides.
deck is a tool for creating deck using Markdown and Google Slides.
Homebrew:
$ brew install deckgo install:
$ go install github.com/k1LoW/deck/cmd/deck@latestManual installation:
Download the binary from the releases page
Google Slides API and Google Drive API at the API & Services page.Credentials page and click + CREATE CREDENTIALS at the top.OAuth client ID type of credentials.Desktop app.${XDG_DATA_HOME:-~/.local/share}/deck/credentials.json.If you're setting up deck for automated workflows (GitHub Actions, CI/CD pipelines), see Service Account Setup Guide.
deck doctorYou can verify if deck is ready to use and diagnose any configuration issues with the deck doctor command.
deck newdeck requires two main components:
xxxxxXXXXxxxxxXXXXxxxxxxxxxx from the URL https://docs.google.com/presentation/d/xxxxxXXXXxxxxxXXXXxxxxxxxxxx/edit)You can create a new presentation with the deck new command:
$ deck new deck.md --title "Talk about deck"
Applied frontmatter to deck.md
xxxxxXXXXxxxxxXXXXxxxxxxxxxxThis will create (or update) the given markdown file with frontmatter containing the presentation ID and title.
To reuse the theme from an existing presentation, you have two options:
Option 1: Use the --base flag
$ deck new deck.md --base yyyyyyyYYYYyYYYYYYYyyyyyyyyy --title "Talk about deck"
xxxxxXXXXxxxxxXXXXxxxxxxxxxxOption 2: Set a default base presentation in your configuration file
# ~/.config/deck/config.yml
basePresentationID: "yyyyyyyYYYYyYYYYYYYyyyyyyyyy"With this configuration, you can reuse the theme from the base presentation without using the --base flag. If both the configuration and --base flag are present, the --base flag takes precedence.
Get the presentation ID you want to work with. You can list all presentations with deck ls.
$ deck ls
xxxxxXXXXxxxxxXXXXxxxxxxxxxx My Presentation
yyyyyYYYYyyyyyYYYYyyyyyyyyyy Team Project Slides[!NOTE]
deckfully supports Google Shared Drives (Team Drives). Presentations stored in shared drives are automatically included in listings and can be operated on just like personal drive presentations.
To use this presentation, specify it with the --presentation-id flag or add it to your markdown file's frontmatter as presentationID.
Edit your markdown file with your favorite editor. Among horizontal rule syntaxes, three or more consecutive hyphens at the beginning of a line (e.g. ---) are treated as slide page separators. See Markdown file format for deck for details.
deck apply$ deck apply deck.mdYou can use the --watch flag to continuously monitor changes to your markdown file and automatically apply them to the presentation:
$ deck apply --watch deck.mdThis is useful during the content creation process as it allows you to see your changes reflected in the presentation in real-time as you edit the markdown file.
[!NOTE] The
--watchflag cannot be used together with the--pageflag.
deck openYou can open your Google Slides presentation in your default web browser:
$ deck open deck.mddeckThe Markdown used by deck consists of YAML frontmatter and a body section.
deck accepts YAML frontmatter at the beginning of your markdown file.
---
presentationID: xxxxxXXXXxxxxxXXXXxxxxxxxxxx
title: Talk about deck
---
# First Slide
Content...The frontmatter must be:
--- delimiterscamelCase for fields used in deck settingspresentationID (string): Google Slides presentation ID. When specified, you can use the simplified command syntax.title (string): The title of the presentation. When specified, you can use the simplified command syntax.breaks (boolean): Control how line breaks are rendered. Default (false or omitted) renders line breaks as spaces. When true, line breaks in markdown are rendered as actual line breaks in slides. Can also be configured globally in config.yml.codeBlockToImageCommand (string): Command to convert code blocks to images. When specified, code blocks in the presentation will be converted to images using this command. Can also be configured globally in config.yml.defaults (array): Define conditional actions using CEL (Common Expression Language) expressions. Actions are automatically applied to pages based on page structure and content. Only applies to pages without explicit page configuration. Can also be configured globally in config.yml.deck supports CommonMark and selected GitHub Flavored Markdown extensions. For comprehensive documentation, see Markdown Support Documentation.
Key supported features:
**bold** )*italic* __italic__ )~~strikethrough~~ )- * )1. 1) )[Link](https://example.com) ) (for newline)> block quote ), , , , , , , , , , , , , , , , , )deck provides configurable line break behavior through the breaks setting:
breaks: false): Single line breaks become spaces (per CommonMark/GFM specs)breaks: true: Line breaks are preserved (GitHub-style rendering) tagExample with breaks: true:
---
breaks: true
---
Text with
line breaks
preservedHTML comments `` are used for speaker notes or page configuration.
deck inserts values according to the following rules regardless of the slide layout.
CENTERED_TITLE or TITLE ) in order.#), which is the standard for slide titlesSUBTITLE ) in order.##) becomes the subtitleBODY ) in order.For example:
# (H1), then # becomes the title and ## becomes the subtitle## (H2) or deeper, then ## becomes the title and ### becomes the subtitle[!NOTE] They are inserted in the order they appear in the markdown document, from the placeholder at the top of the slide (or from the placeholder on the left if placeholders are at the same height).
Also, if there are not enough placeholders, the remaining contents will not be rendered.
Input markdown document:
# CAP theorem
## In Database theory
## Consistency
Every read receives the most recent write or an error.
## Availability
Every request received by a non-failing node in the system must result in a response.
## Partition tolerance
The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes.Layout and placeholders:
Result of applying:
deck supports global configuration files that provide default settings for all presentations. Configuration files are loaded in the following order:
${XDG_CONFIG_HOME:-~/.config}/deck/config-{profile}.yml (when using --profile option)${XDG_CONFIG_HOME:-~/.config}/deck/config.yml (default config file)The configuration file uses YAML format and supports the same fields as frontmatter. Settings in frontmatter take precedence over configuration file settings, which in turn take precedence over built-in defaults.
…basePresentationID (string): Base presentation ID to use as a template when creating new presentationsbreaks (boolean): Global line break rendering behaviorcodeBlockToImageCommand (string): Global command to convert code blocks to imagesfolderID (string): Default folder ID to create presentations and upload temporary images todefaults (array): A series of conditions and actions written in CEL expressions for default page configsSettings are applied in the following order (highest to lowest priority):
This allows you to set organization-wide or project-wide defaults while still maintaining the flexibility to override them on a per-file basis using frontmatter or command-line options.
Create a layout named style and add a Text box to enter specific words. The styles (bold, italic, underline, backgroundColor, foregroundColor, fontFamily) will be applied as the style for each Markdown syntax.
| Word | |
|---|---|
bold |
style for bold. |
italic |
style for italic. |
link |
style for link. |
code |
style for code. |
del |
style for |
blockquote |
style for block quote. |
| HTML element names | style for content of inline HTML elements ( e.g. , , , , etc. ) |
| (other word) | style for content of inline HTML elements with matching class name ( e.g. THIS IS NOTICE ) |
You can also customize table s
No open issues yet, or sync has not completed.