{"id":21182434,"url":"https://github.com/theme-next/theme-next-pdf","last_synced_at":"2025-08-12T10:02:39.659Z","repository":{"id":90598681,"uuid":"156425512","full_name":"theme-next/theme-next-pdf","owner":"theme-next","description":"PDF.js for NexT.","archived":false,"fork":false,"pushed_at":"2020-03-08T14:07:55.000Z","size":4683,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-02-23T21:37:27.601Z","etag":null,"topics":["module","pdf","theme-next"],"latest_commit_sha":null,"homepage":"https://github.com/mozilla/pdf.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theme-next.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-06T18:00:06.000Z","updated_at":"2023-10-07T07:45:17.000Z","dependencies_parsed_at":"2023-04-11T05:32:18.723Z","dependency_job_id":null,"html_url":"https://github.com/theme-next/theme-next-pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Ftheme-next-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Ftheme-next-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Ftheme-next-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-next%2Ftheme-next-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theme-next","download_url":"https://codeload.github.com/theme-next/theme-next-pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225606632,"owners_count":17495551,"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":["module","pdf","theme-next"],"created_at":"2024-11-20T17:57:02.761Z","updated_at":"2024-11-20T17:57:03.276Z","avatar_url":"https://github.com/theme-next.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ca href=\"https://github.com/mozilla/pdf.js\"\u003ePDF.js\u003c/a\u003e for \u003ca href=\"https://github.com/theme-next\"\u003eNexT\u003c/a\u003e\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003eIntroduce\u003c/h2\u003e\n\nThis is a plugin that allows to preview PDF files in the blog pages.\n\nIf the browser supports embedded PDFs natively, NexT will create a `\u003cembed\u003e` tag and include the PDF file on your website. Otherwise it will create a `\u003ciframe\u003e` tag and uses PDF.js by @mozilla to render the pdf file.\n\nFollow the guide below to install dependencies.\n\n\u003ch1 align=\"center\"\u003eInstallation\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003eStep 1 \u0026rarr; Go to NexT dir\u003c/h2\u003e\n\nChange dir to **NexT** directory. There must be `layout`, `source`, `languages` and other directories:\n\n```sh\n$ cd themes/next\n$ ls\n_config.yml  crowdin.yml  docs  gulpfile.js  languages  layout  LICENSE.md  package.json  README.md  scripts  source\n```\n\n\u003ch2 align=\"center\"\u003eStep 2 \u0026rarr; Get module\u003c/h2\u003e\n\nInstall module to `source/lib` directory:\n\n```sh\n$ git clone https://github.com/theme-next/theme-next-pdf source/lib/pdf\n```\n\n\u003ch2 align=\"center\"\u003eStep 3 \u0026rarr; Set it up\u003c/h2\u003e\n\nEnable module in **NexT** `_config.yml` file:\n\n```yml\n# PDF tag\n# NexT will try to load pdf files natively, if failed, pdf.js will be used.\n# So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers.\n# See: https://github.com/theme-next/theme-next-pdf\npdf:\n  enable: true\n  # Default height\n  height: 500px\n```\n\n\u003ch1 align=\"center\"\u003eUsage\u003c/h1\u003e\nIn order to embed PDF files in the article, you just need to create an `pdf` tag with the URL of your local PDF file, e.g.\n\n```\n{% pdf /path/to/your/file.pdf %}\n```\nNotice: Do not use cross-origin PDF files, it might be blocked by the CORS policy.\n\nEnjoy it!\n\n\u003ch1 align=\"center\"\u003eUpdate\u003c/h1\u003e\n\n```sh\n$ cd themes/next/source/lib/pdf\n$ git pull\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-next%2Ftheme-next-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheme-next%2Ftheme-next-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-next%2Ftheme-next-pdf/lists"}