{"id":13401545,"url":"https://github.com/googleworkspace/md2googleslides","last_synced_at":"2025-05-14T14:08:22.501Z","repository":{"id":37035419,"uuid":"73115219","full_name":"googleworkspace/md2googleslides","owner":"googleworkspace","description":"Generate Google Slides from markdown","archived":false,"fork":false,"pushed_at":"2025-03-28T22:18:34.000Z","size":3461,"stargazers_count":4559,"open_issues_count":80,"forks_count":302,"subscribers_count":75,"default_branch":"main","last_synced_at":"2025-05-07T05:36:13.703Z","etag":null,"topics":["google-slides","google-workspace","gsuite","slides"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleworkspace.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-07T19:54:09.000Z","updated_at":"2025-04-29T07:07:13.000Z","dependencies_parsed_at":"2023-02-06T11:16:50.189Z","dependency_job_id":"19a0bcd6-4d80-4926-be4e-d8bf659e2782","html_url":"https://github.com/googleworkspace/md2googleslides","commit_stats":null,"previous_names":["googlesamples/md2googleslides","gsuitedevs/md2googleslides"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fmd2googleslides","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fmd2googleslides/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fmd2googleslides/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleworkspace%2Fmd2googleslides/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleworkspace","download_url":"https://codeload.github.com/googleworkspace/md2googleslides/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159761,"owners_count":22024564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-slides","google-workspace","gsuite","slides"],"created_at":"2024-07-30T19:01:03.946Z","updated_at":"2025-05-14T14:08:22.480Z","avatar_url":"https://github.com/googleworkspace.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"Generate Google Slides from markdown \u0026 HTML. Run from the command line or embed in another\napplication.\n\nThis project was developed as an example of how to use the\n[Slides API](https://developers.google.com/slides).\n\nWhile it does not yet produce stunningly beautiful decks, you are encouraged to use\nthis tool for quickly prototyping presentations.\n\nContributions are welcome.\n\n## Installation and usage\n\nFor command line use, install md2gslides globally:\n\n```sh\nnpm install -g md2gslides\n```\n\nThen get your OAuth client ID credentials:\n\n* Create (or reuse) a developer project at \u003chttps://console.developers.google.com\u003e\n* Enable Google Slides API at [API library page](https://console.developers.google.com/apis/library)\n* Go to [Credentials page](https://console.developers.google.com/apis/credentials) and click \"+ Create credentials\" at the top\n* Select \"OAuth client ID\" authorization credentials\n* Choose type \"Computer Application\" and give it some name.\n* Download client credentials file.\n* Copy it to `client_id.json` (name has to match) and save to `~/.md2googleslides`.\n\nAfter installing, import your slides by running:\n\n```sh\nmd2gslides slides.md --title \"Talk Title\"\n```\n\nThis will generate new Google Slides in your account with title `Talk Title`. \n\nNOTE: The first time the command is run you will be prompted for authorization. OAuth token\ncredentials are stored locally in a file named `~/.md2googleslides/credentials.json`.\n\nEach time you will run the above comment, new slide deck will be generated. In order to work on exactly the same\ndeck, just get the ID of the already generated slides. For example, you can use following command:\n\n```\n# To reuse deck available at: https://docs.google.com/presentation/d/\u003csome id\u003e/edit#\nmd2gslides slides.md --title \"Talk Title\" --append \u003csome id\u003e --erase\n```\n\n## Supported markdown rules\n\nmd2gslides uses a subset of the [CommonMark](http://spec.commonmark.org/0.26/) and\n[Github Flavored Markdown](https://help.github.com/categories/writing-on-github/) rules for\nmarkdown.\n\n### Slides\n\nEach slide is typically represented by a header, followed by zero or more block elements.\n\nBegin a new slide with a horizontal rule (`---`). The separator\nmay be omitted for the first slide.\n\nThe following examples show how to create slides of various layouts:\n\n#### Title slide\n\n\u003cpre\u003e\n    ---\n\n    # This is a title slide\n    ## Your name here\n\u003c/pre\u003e\n\n![Title slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/title_slide.png)\n\n#### Section title slides\n\n\u003cpre\u003e\n    ---\n\n    # This is a section title\n\u003c/pre\u003e\n\n![Section title slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/section_title_slide.png)\n\n#### Section title \u0026 body slides\n\n\u003cpre\u003e\n    ---\n\n    # Section title \u0026 body slide\n\n    ## This is a subtitle\n\n    This is the body\n\u003c/pre\u003e\n\n![Section title \u0026 body slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/section_title_body_slide.png)\n\n#### Title \u0026 body slides\n\n\u003cpre\u003e\n    ---\n\n    # Title \u0026 body slide\n\n    This is the slide body.\n\u003c/pre\u003e\n\n![Title \u0026 body slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/title_body_slide.png)\n\n#### Main point slide\n\nAdd `{.big}` to the title to make a slide with one big point\n\n\u003cpre\u003e\n    ---\n\n    # This is the main point {.big}\n\u003c/pre\u003e\n\n![Main point slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/main_point_slide.png)\n\n#### Big number slide\n\nUse `{.big}` on a header in combination with a body too.\n\n\u003cpre\u003e\n    ---\n\n    # 100% {.big}\n\n    This is the body\n\u003c/pre\u003e\n\n![Big number slide](examples/big_number_slide.png)\n\n\n#### Two column slides\n\nSeparate columns with `{.column}`. The marker must appear\non its own line with a blank both before and after.\n\n\u003cpre\u003e\n    ---\n\n    # Two column layout\n\n    This is the left column\n\n    {.column}\n\n    This is the right column\n\u003c/pre\u003e\n\n![Two column slide](https://github.com/googlesamples/md2googleslides/raw/master/examples/two_column_slide.png)\n\n### Themes\n\n`md2googleslides` does not edit or control any theme related options. Just set a base theme you want on Google Slides directly.\nEven if you will use `--append` option for deck reuse, theme will be not changed.\n\n### Images\n\n#### Inline images\n\nImages can be placed on slides using image tags. Multiple images\ncan be included. Mulitple images in a single paragraph are arranged in columns,\nmutiple paragraphs arranged as rows.\n\nNote: Images are currently scaled and centered to fit the\nslide template.\n\n\u003cpre\u003e\n    ---\n\n    # Slides can have images\n\n    ![](https://placekitten.com/900/900)\n\u003c/pre\u003e\n\n![Slide with image](https://github.com/googlesamples/md2googleslides/raw/master/examples/image_slide.png)\n\n#### Background images\n\nSet the background image of a slide by adding `{.background}` to\nthe end of an image URL.\n\n\u003cpre\u003e\n    ---\n\n    # Slides can have background images\n\n    ![](https://placekitten.com/1600/900){.background}\n\u003c/pre\u003e\n\n![Slide with background image](https://github.com/googlesamples/md2googleslides/raw/master/examples/background_image_slide.png)\n\n### Videos\n\nInclude YouTube videos with a modified image tag.\n\n\u003cpre\u003e\n    ---\n\n    # Slides can have videos\n\n    @[youtube](MG8KADiRbOU)\n\u003c/pre\u003e\n\n![Slide with video](https://github.com/googlesamples/md2googleslides/raw/master/examples/video_slide.png)\n\n### Speaker notes\n\nInclude speaker notes for a slide using HTML comments. Text inside\nthe comments may include markdown for formatting, though only text\nformatting is allowed. Videos, images, and tables are ignored inside\nspeaker notes.\n\n\u003cpre\u003e\n    ---\n\n    # Slide title\n\n    ![](https://placekitten.com/1600/900){.background}\n\n    \u0026lt;!--\n    These are speaker notes.\n    --\u0026gt;\n\u003c/pre\u003e\n\n### Formatting\n\nBasic formatting rules are allowed, including:\n\n* Bold\n* Italics\n* Code\n* Strikethrough\n* Hyperlinks\n* Ordered lists\n* Unordered lists\n\nThe following markdown illustrates a few common styles.\n\n\u003cpre\u003e\n**Bold**, *italics*, and ~~strikethrough~~ may be used.\n\nOrdered lists:\n1. Item 1\n1. Item 2\n  1. Item 2.1\n\nUnordered lists:\n* Item 1\n* Item 2\n  * Item 2.1\n\u003c/pre\u003e\n\nAdditionally, a subset of inline HTML tags are supported for styling.\n\n* `\u003cspan\u003e`\n* `\u003csup\u003e`\n* `\u003csub\u003e`\n* `\u003cem\u003e`\n* `\u003ci\u003e`\n* `\u003cstrong\u003e`\n* `\u003cb\u003e`\n\nSupported CSS styles for use with `\u003cspan\u003e` elements:\n\n* `color`\n* `background-color`\n* `font-weight: bold`\n* `font-style: italic`\n* `text-decoration: underline`\n* `text-decoration: line-through`\n* `font-family`\n* `font-variant: small-caps`\n* `font-size` (must use points for units)\n\nYou may also use `{style=\"...\"}` [attributes](https://www.npmjs.com/package/markdown-it-attrs)\nafter markdown elements to apply styles. This can be used on headers, inline\nelements, code blocks, etc.\n\n### Emoji\n\nUse Github style [emoji](http://www.webpagefx.com/tools/emoji-cheat-sheet/) in your text using\nthe `:emoji:`.\n\nThe following example inserts emoji in the header and body of the slide.\n\n\u003cpre\u003e\n### I :heart: cats\n\n:heart_eyes_cat:\n\u003c/pre\u003e\n\n### Code blocks\n\nBoth indented and fenced code blocks are supported, with syntax highlighting.\n\nThe following example renders highlighted code.\n\n\u003cpre\u003e\n### Hello World\n\n```javascript\nconsole.log('Hello world');\n```\n\u003c/pre\u003e\n\nTo change the syntax highlight theme specify the `--style \u003ctheme\u003e` option on the\ncommand line. All [highlight.js themes](https://github.com/isagalaev/highlight.js/tree/master/src/styles)\nare supported. For example, to use the github theme\n\n```sh\nmd2gslides slides.md --style github\n```\n\nYou can also apply additional style changes to the entire block, such as changing\nthe font size:\n\n\u003cpre\u003e\n### Hello World\n\n```javascript\nconsole.log('Hello world');\n```{style=\"font-size: 36pt\"}\n\u003c/pre\u003e\n\n### Tables\n\nTables are supported via\n[GFM](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) syntax.\n\nNote: Including tables and other block elements on the same slide may produce poor results with\noverlapping elements. Either avoid or manually adjust the layout after generating the slides.\n\nThe following generates a 2x5 table on the slide.\n\n\u003cpre\u003e\n### Top pets in the United States\n\nAnimal | Number\n-------|--------\nFish   | 142 million\nCats   | 88 million\nDogs   | 75 million\nBirds  | 16 million\n\u003c/pre\u003e\n\n### Local images\n\nImages referencing local paths temporarily uploaded and hosted to [file.io](https://file.io). File.io\nis an emphemeral file serving service that generates short-lived random URLs to the upload file and deletes\ncontent shortly after use.\n\nSince local images are uploaded to a thrid party, explicit opt-in is required to use this feature.\nInclude the `--use-fileio` option to opt-in to uploading images. This applies to file-based images as well\nas automatically rasterized content like math expressions and SVGs.\n\n### Image rasterization\n\nSlides can also include generated images, using `$$$` fenced blocks\nfor the data. Currently supported generated images are math expression (TeX\nand MathML) as well as SVG. Rasterized images are treated like local images are require\nopt-in to uploading images to a 3rd party service via the `--use-fileio` option.\n\nUsing TeX:\n\n\u003cpre\u003e\n# How about some math?\n\n$$$ math\n\\cos (2\\theta) = \\cos^2 \\theta - \\sin^2 \\theta\n$$$\n\u003c/pre\u003e\n\nSVG\n\n\u003cpre\u003e\n# Or some SVG?\n\n$$$ svg\n\u0026lt;svg xmlns=\"http://www.w3.org/2000/svg\"\n     xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n     viewBox=\"0 0 48 48\"\u003e\n  \u0026lt;defs\u003e\n    \u0026lt;path id=\"a\" d=\"M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z\"/\u003e\n  \u0026lt;/defs\u003e\n  \u0026lt;clipPath id=\"b\"\u003e\n    \u0026lt;use xlink:href=\"#a\" overflow=\"visible\"/\u003e\n  \u0026lt;/clipPath\u003e\u003cpath clip-path=\"url(#b)\" fill=\"#FBBC05\" d=\"M0 37V11l17 13z\"/\u003e\n  \u0026lt;path clip-path=\"url(#b)\" fill=\"#EA4335\" d=\"M0 11l17 13 7-6.1L48 14V0H0z\"/\u003e\n  \u0026lt;path clip-path=\"url(#b)\" fill=\"#34A853\" d=\"M0 37l30-23 7.9 1L48 0v48H0z\"/\u003e\n  \u0026lt;path clip-path=\"url(#b)\" fill=\"#4285F4\" d=\"M48 48L17 24l-4-3 35-10z\"/\u003e\n\u0026lt;/svg\u003e\n$$$\n\u003c/pre\u003e\n\nLike local images, generated images are temporarily served via file.io.\n\nPull requests for other image generators (e.g. mermaid, chartjs, etc.) are welcome!\n\n## Reading from standard input\n\nYou can also pipe markdown into the tool by omitting the file name argument.\n\n## Contributing\n\nWith the exception of `/bin/md2gslides.js`, TypeScript is used throughout and compiled\nwith [Babel](https://babeljs.io/). [Mocha](https://mochajs.org/) and [Chai](http://chaijs.com/)\nare used for testing.\n\nBefore anything, ensure you have all dependencies:\n\n```sh\nnpm install\n```\n\nTo compile:\n\n```sh\nnpm run compile\n```\n\nTo run unit tests:\n\n```sh\nnpm run test\n```\n\nTo lint/format tests:\n\n```sh\nnpm run lint\n```\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for additional terms.\n\n## License\n\nThis library is licensed under Apache 2.0. Full license text is\navailable in [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleworkspace%2Fmd2googleslides","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleworkspace%2Fmd2googleslides","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleworkspace%2Fmd2googleslides/lists"}