Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Feature: PDFObject and PDF.js support #466

Merged
merged 9 commits into from
Nov 7, 2018
Merged

New Feature: PDFObject and PDF.js support #466

merged 9 commits into from
Nov 7, 2018

Conversation

stevenjoezhang
Copy link
Contributor

@stevenjoezhang stevenjoezhang commented Nov 6, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs have been added / updated (for bug fixes / features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

Issue Number(s): #442

What is the new behavior?

Description about this pull, in several words...

  • Screens with this changes: N/A
  • Link to demo site with this changes: N/A

How to use?

  1. Install module from https://github.com/theme-next/theme-next-pdf

  2. In NexT _config.yml:

# PDF Support
# Dependencies: https://github.com/theme-next/theme-next-pdf
pdf:
  enable: false

  # Default(true) will load PDFObject/PDF.js script on demand
  # That is it only render those page who has 'pdf: true' in Front Matter.
  # If you set it to false, it will load PDFObject/PDF.js srcipt EVERY PAGE.
  per_page: true

  pdfobject:
    # Use 2.1.1 as default, cloudflare as default CDN
    cdn: //cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js
    height: 500px

Set enable: true, then create a new blog file e.g.pdf.md contains:

---
title: PDF
categories:
date: 2018-11-03 18:53:16
tags:
pdf: true
---

[](/path/to/your/local/file.pdf)

Then you can preview the pdf file in your blog.

Does this PR introduce a breaking change?

  • Yes.
  • No.

@stevenjoezhang stevenjoezhang changed the title Fix #442: New Feature: PDFObject and pdf.js support Fix #442: New Feature: PDFObject and PDF.js support Nov 6, 2018
@ivan-nginx
Copy link
Member

ivan-nginx commented Nov 6, 2018

Please, create separate repo under https://github.com/theme-next for source/lib/pdf* files. Too many files there and it's third-party feature.


Invite to Org was sended...

@stevenjoezhang
Copy link
Contributor Author

stevenjoezhang commented Nov 6, 2018

@ivan-nginx Thanks for your invitation. I have created a new repo: https://github.com/theme-next/theme-next-pdf

@ivan-nginx
Copy link
Member

@stevenjoezhang good, and check e-mail please.

@ivan-nginx ivan-nginx added this to the v6.6.0 milestone Nov 7, 2018
@ivan-nginx ivan-nginx changed the title Fix #442: New Feature: PDFObject and PDF.js support New Feature: PDFObject and PDF.js support Nov 7, 2018
@ivan-nginx ivan-nginx mentioned this pull request Nov 7, 2018
11 tasks
@ivan-nginx ivan-nginx merged commit 64fd74a into theme-next:master Nov 7, 2018
@stevenjoezhang stevenjoezhang deleted the pdfjs branch November 7, 2018 12:28
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
New Feature: PDFObject and PDF.js support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants