Giter VIP home page Giter VIP logo

hugo-adobe-pdf-api-shortcode's Introduction

Hugo Adobe pdf api shortcode


Table of Contents


Intro

Hugo shortcode for use PDF Embed API from Adobe

For more info you can check the api docu

Install

  1. Clone the repo https://github.com/toniop99/hugo-adobe-pdf-api-shortcode

  1. Copy ./layouts/shortcodes/pdf.html to ./layouts/shortcodes in your Hugo project.

  1. Add adobe sdk to ypur page script html (scripts.html or footer.html)
    <script type="text/javascript" src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
  1. Create an api on adobe developer page

    • Create an account
    • Create a project
    • Copy the API KEY (CLIENT ID) to your config.yaml params.

    ClientId on config.yaml

How to use

In your Hugo website place the following shortcode in any of the markdown pages.

    {{< pdf fileName="test" url="/files/resume.pdf" type="IN_LINE" >}}

Parameters

  • url (required) : The relative location of the file.
  • fileName (optional): Name of the file. Default to url provided.
  • type (optional)<FULL_WINDOW, SIZED_CONTAINER, IN_LINE OR LIGHT_BOX>: How the pdf will be shown. Default to IN_LINE More info on Adobe API Doc

Examples

IN LINE

IN_LINE

LightBox

LIGHT_BOX

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.