Giter Site home page Giter Site logo

zu-min-g / template-marp-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yhatt/marp-cli-example

0.0 0.0 0.0 633 KB

The good starter for using Marp via Marp CLI, by the author of Marp

Home Page: https://yhatt.github.io/marp-cli-example

License: Do What The F*ck You Want To Public License

JavaScript 33.86% CSS 11.82% Dockerfile 54.32%

template-marp-cli's Introduction

Marp CLI example

The good starter example for using Marp via Marp CLI.

  • Write your slide deck by Marp Markdown.
  • Manage the content of slides via Git. (Using GitPitch style PITCHME.md)
  • Host your deck at GitHub, and publish as webpage with GitHub Pages, Netlify, and Vercel (ZEIT Now)!

See published slide deck

Usage

It's surprisingly easy to start publishing your slide deck through Netlify and Vercel! (GitHub Pages requires a few steps)

Fork this repository from "Fork" button in right-top corner to start!

Setup GitHub Actions

We have GitHub Actions workflow to build and deploy from master to gh-pages automatically.

In the moment, deploying from public repository to GitHub Pages requires setting up your access token as secret. (Track discussion in forum...)

  1. Go to "Personal Access Tokens" setting page and click "Generate New Token".
  2. Create new token with "repo" scope, and copy generated token.
  3. Go to "Settings" tab in forked repository, and select "Secrets" from sidebar.
  4. Add a new secret "ACCESS_TOKEN" with the value of generated token.
  5. Turn on GitHub Actions in forked repository from "Actions" tab.

Marp slide deck generated from PITCHME.md will be published to https://<your-name>.github.io/<repository-name>.

⚠️ Please notice the slide deck hosted with GitHub Pages will be made public even if you forked this to private repository.

Push "Deploy to netlify" button. Netlify will create your repository based on this example and host website from master branch automatically.

Deploy to Netlify

Vercel (formerly ZEIT Now)

Push "Deploy" button. Vercel can choose to create your repository into GitHub / GitLab / BitBucket based on this example, or just to try publishing slide deck in your without fork.

Deploy to Vercel

ℹ️ The auto-generated open graph image is not available in deployment through Vercel.

How to write

For Marp slide deck features, please see the documentation of Marpit Markdown, the features of Marp Core, and the default example in PITCHME.md for .

You have to install Node.js and run npm i at first if you want to write slide deck with Marp CLI.

Edit deck

Just edit PITCHME.md!

Preview deck

Marp for VS Code extension is the best partner for writing Marp slide deck with live preview.

Preview via CLI

npm run start

It will be opened preview window via installed Google Chrome, and track change of PITCHME.md.

Assets and themes

  • assets directory can put your assets for using in the deck. (e.g. Image resources)
  • themes directory can put custom theme CSS. To use in the deck, please change theme global directive.

Build deck via CLI

npm run build

The built assets will output to dist folder.

Build per assets

npm run deck      # Output static HTML to dist/index.html
npm run og-image  # Output image for Open Graph to dist/og-image.jpg

LICENSE

WTFPL

template-marp-cli's People

Contributors

dependabot[bot] avatar yhatt avatar zu-min-g avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.