Code Monkey home page Code Monkey logo

youtubepublishplugin's Introduction

YoutubePublishPlugin

This plugin for Publish will let you embed YouTube videos in your posts easily.

Installation

To install this plugin into your Publish package, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/tanabe1478/YoutubePublishPlugin.git", from: "0.1.0")
    ],
    targets: [
        .target(
            ...
            dependencies: [
                ...
                "YoutubePublishPlugin"
            ]
        )
    ]
    ...
)

And import to use it:

import YoutubePublishPlugin

For more information on how to use the Swift Package Manager, check out its official documentation.

Usage

To embed a youtube in your post, use a blockquote in markdown, but add the "youtube" prefix, like this:

> youtube https://www.youtube.com/watch?v=Z-VfaG9ZN_U

This plugin is compatible with https://youtu.be/ZyJwfxqpUXA and https://www.youtube.com/watch?v=Z-VfaG9ZN_U only.

To install the plugin, add it to your site's publishing steps:

try mysite().publish(using: [
    .installPlugin(.youtube()),
    // ...
])

Acknowledgement

Thanks to John Sundell (@johnsundell) for creating Publish and SplashPublishPlugin.

Thanks to Guilherme Rambo (@insidegui) for creating the TwitterPublishPlugin that has been a inspiration for this plugin.

License

MIT License

youtubepublishplugin's People

Contributors

tanabe1478 avatar zaneenders 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.