[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70625":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},70625,"ReLaXed","RelaxedJS\u002FReLaXed","RelaxedJS","Create PDF documents using web technologies",null,"JavaScript",11789,423,177,45,0,3,42.88,"ISC License",false,"master",true,[23,24,25,26,27,28],"chromium","converter","html","pdf-document","pug","scss","2026-06-12 02:02:35","\u003Cp align=\"center\">\u003Cimg width='270px' src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fraw\u002Fmaster\u002Flogo-blue.png\" \u002F>\u003C\u002Fp>\n\n# ReLaXed\n\n[![Build Status](https:\u002F\u002Ftravis-ci.org\u002FRelaxedJS\u002FReLaXed.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FRelaxedJS\u002FReLaXed)\n\nReLaXed creates PDF documents interactively using HTML or [Pug](https:\u002F\u002Fpugjs.org\u002Fapi\u002Fgetting-started.html) (a shorthand for HTML). It allows complex layouts to be defined with CSS and JavaScript, while writing the content in a friendly, minimal syntax close to Markdown or LaTeX.\n\nHere it is in action in the Atom editor:\n\n\u003Cp align='center'>\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002F4N4fSYY.gif\" title=\"source: imgur.com\" \u002F>\u003C\u002Fp>\n\nAnd here are a few output examples:\n\n\u003Ctable>\n  \u003Ctr align=\"center\">\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fbook\u002Fbook.pdf\">\n        \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fbook\u002Fbook_screenshot.png\" \u002F>\n      \u003C\u002Fa>\n      Book -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fbook\u002F\"> source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fbook\u002Fbook.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fletter\u002Fletter.pdf\">\n        \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fletter\u002Fletter_screenshot.png\" \u002F>\n      \u003C\u002Fa>\n      Letter -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fletter\u002F\"> Source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fletter\u002Fletter.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fresume\u002Fresume.pdf\">\n        \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fresume\u002Fresume_screenshot.png\" \u002F>\n      \u003C\u002Fa>\n      Resume -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fresume\u002F\"> Source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fresume\u002Fresume.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fbusiness-card\u002Fbusiness-card.pdf\">\n      \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fbusiness-card\u002Fbusinesscard_screenshot.png\" \u002F>\u003C\u002Fa>\n      Visit card -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fbusiness-card\u002F\"> Source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fbusiness-card\u002Fbusiness-card.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\u003Ctable>\n  \u003Ctr align=\"center\">\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fslides\u002Fslides.pdf\">\n        \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fslides\u002Fslides_screenshot.png\" \u002F>\n      \u003C\u002Fa>\n      Slides -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fslides\u002F\"> Source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fslides\u002Fslides.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Freport\u002Freport.pdf\">\n        \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Freport\u002Freport_screenshot.png\" \u002F>\n      \u003C\u002Fa>\n      Report -\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Freport\u002F\"> Source \u003C\u002Fa> \u002F\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Freport\u002Freport.pdf\"> PDF \u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"25%\">\n       \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fpaper\u002Fpaper.pdf\">\n         \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fpaper\u002Fpaper_screenshot.png\" \u002F>\n       \u003C\u002Fa>\n       Paper -\n       \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fpaper\u002F\"> Source \u003C\u002Fa> \u002F\n       \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fpaper\u002Fpaper.pdf\"> PDF \u003C\u002Fa>\n     \u003C\u002Ftd>\n   \u003Ctd width=\"25%\">\n     \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fposter\u002Fposter.pdf\">\n       \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fraw\u002Fmaster\u002Fexamples\u002Fposter\u002Fposter_screenshot.png\" \u002F>\n     \u003C\u002Fa>\n     Poster -\n     \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Ftree\u002Fmaster\u002Fexamples\u002Fposter\u002F\"> Source \u003C\u002Fa> \u002F\n     \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples\u002Fblob\u002Fmaster\u002Fexamples\u002Fposter\u002Fposter.pdf\"> PDF \u003C\u002Fa>\n   \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\nReLaXed has support for Markdown, LaTeX-style mathematical equations (via [MathJax](https:\u002F\u002Fwww.mathjax.org\u002F)), CSV conversion to HTML tables, plot generation (via [Vega-Lite](https:\u002F\u002Fvega.github.io\u002Fvega-lite\u002F) or [Chart.js](https:\u002F\u002Fwww.chartjs.org\u002F)), and diagram generation (via [mermaid](https:\u002F\u002Fmermaidjs.github.io\u002F)). Many more features can be added simply by importing an existing JavaScript or CSS framework.\n\n## Installing ReLaXed\n\nInstall ReLaXed via [NPM](https:\u002F\u002Fwww.npmjs.com\u002F) with this command (do not use ``sudo``):\n\n```\nnpm i -g relaxedjs\n```\n\nThis will provide your system with the ``relaxed`` command. If the installation fails, refer to the [troubleshooting page](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FTroubleshooting). You can also use ReLaXed via Docker (see [this repository](https:\u002F\u002Fgithub.com\u002Fjonathanasquier\u002FReLaXed-docker\u002Fblob\u002Fmaster\u002FDockerfile))\n\n\n## Getting started\n\nTo start a project, create a new document ``my_document.pug`` with the following Pug content:\n\n```pug\nh1 My document's title\np A paragraph in my document\n```\n\nThen start ReLaXed from a terminal:\n\n```\nrelaxed my_document.pug\n```\n\nReLaXed will generate ``my_document.pdf`` from ``my_document.pug``, then watch its directory and subdirectories so that every time a file changes, ``my_document.pdf`` will be re-generated.\n\nIt is also possible to generate the PDF file just once, with no sub-sequent file-watching, with this command:\n\n```\nrelaxed my_document.pug --build-once\n```\n\nTo go further:\n\n- Read more about [usage and options](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FCommand-line-options) of the ``relaxed`` command.\n- Learn more about the capabilities of the [Pug language](https:\u002F\u002Fpugjs.org\u002Fapi\u002Fgetting-started.html)\n- Learn how to use or write [ReLaXed plugins](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FPlugins)\n- Browse the [examples](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed-examples)\n- Read about our [recommended setup](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FTips-and-recommendations) to use ReLaXed\n- read about [special file rendering](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FSpecial-file-renderings) in ReLaxed\n- Read [these comparisons](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fwiki\u002FReLaXed-vs-other-solutions) between ReLaXed and other document-editing systems\n\n## Why yet another PDF document creator?\n\nMany of us prefer markup languages (Markdown, LaTeX, etc.) to GUI document-editors like MS Office or Google Docs. This is because markup languages make it easier to quickly write documents in a consistent style.\n\nHowever, Markdown is limited to the title\u002Fsections\u002Fparagraphs structure, and LaTeX has obscure syntax and errors that also make it difficult to stray from the beaten track.\n\nOn the other hand, web technologies have never looked so good.\n\n- Beautiful CSS frameworks make sure your documents look clean and modern.\n- There are JavaScript libraries for pretty much anything: plotting, highlight code, rendering equations...\n- Millions of people (and growing) know how to use these.\n- Shorthand languages like Pug and SCSS are finally making it fun to write HTML and CSS.\n- (Headless) web browsers can easily turn web documents into PDF, on any platform.\n\nReLaXed is an attempt at finding the most comfortable way to leverage this for desktop PDF creation.\n\n## How ReLaXed works\n\nReLaXed consists of a few lines of code binding together other software. It uses [Chokidar](https:\u002F\u002Fgithub.com\u002Fpaulmillr\u002Fchokidar) to watch the file system. When a file is changed, several JavaScript libraries are used to compile SCSS, Pug, Markdown, and diagram files (mermaid, flowchart.js, Chart.js) into an HTML page which is then printed to a PDF file by a headless instance of Chromium (via [Puppeteer](https:\u002F\u002Fgithub.com\u002FGoogleChrome\u002Fpuppeteer)).\n\n\u003Cp align=\"center\">\u003Cimg width='600px' src=\"https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fraw\u002Fmaster\u002Fdocs\u002Frelaxed_stack.png\" \u002F>\u003C\u002Fp>\n\n## Using it as a Node Module\n**MasterToPDF.js** is exposed by default as main package, which can be used directly.\n\nAn Example: \n\n```javascript\nconst { masterToPDF } = require('relaxedjs');\nconst puppeteer = require('puppeteer');\nconst plugins = require('relaxedjs\u002Fsrc\u002Fplugins');\nconst path = require('path');\n\nclass HTML2PDF {\n  constructor() {\n    this.puppeteerConfig = {\n      headless: true,\n      args: [\n        '--no-sandbox',\n        '--disable-translate',\n        '--disable-extensions',\n        '--disable-sync',\n      ],\n    };\n\n    this.relaxedGlobals = {\n      busy: false,\n      config: {},\n      configPlugins: [],\n    };\n\n    this._initializedPlugins = false;\n  }\n\n  async _initializePlugins() {\n    if (this._initializedPlugins) return; \u002F\u002F Do not initialize plugins twice\n    for (const [i, plugin] of plugins.builtinDefaultPlugins.entries()) {\n      plugins.builtinDefaultPlugins[i] = await plugin.constructor();\n    }\n    await plugins.updateRegisteredPlugins(this.relaxedGlobals, '\u002F');\n\n    const chrome = await puppeteer.launch(this.puppeteerConfig);\n    this.relaxedGlobals.puppeteerPage = await chrome.newPage();\n    this._initializedPlugins = true;\n  }\n\n  async pdf(templatePath, json_data, tempHtmlPath, outputPdfPath) {\n    await this._initializePlugins();\n    if (this._initializedPlugins) {\n      \u002F\u002F Paths must be absolute\n      const defaultTempHtmlPath = tempHtmlPath || path.resolve('temp.html');\n      const defaultOutputPdfPath =\n        outputPdfPath || path.resolve('output.pdf');\n\n      await masterToPDF(\n        templatePath,\n        this.relaxedGlobals,\n        defaultTempHtmlPath,\n        defaultOutputPdfPath,\n        json_data\n      );\n    }\n  }\n}\n\nmodule.exports = new HTML2PDF();\n```\nUsage:\n\n```javascript\nconst HTML2PDF = require('.\u002FHTML2PDF.js');\n(async () => {\n    await HTML2PDF.pdf('.\u002Ftemplate.pug', {\"a\":\"b\", \"c\":\"d\"});\n})();\n```\n\n\n## Contribute!\n\nReLaXed is an open-source framework originally written by [Zulko](https:\u002F\u002Fgithub.com\u002FZulko) and released on [Github](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed) under the ISC licence. Everyone is welcome to contribute!\n\nFor bugs and feature requests, open a Github issue. For support or Pug\u002FHTML-related questions, ask on Stackoverflow or on the brand new [reddit\u002Fr\u002Frelaxedjs](https:\u002F\u002Fwww.reddit.com\u002Fr\u002Frelaxedjs\u002F) forum, which can be used for any kind of discussion.\n\n**Projects members:**\n\n- [@Zulko](https:\u002F\u002Fgithub.com\u002FZulko) (Owner)\n- [@Drew-S](https:\u002F\u002Fgithub.com\u002FDrew-S) (architecture, plugins)\n- [@DanielRuf](https:\u002F\u002Fgithub.com\u002FDanielRuf)\n- [@benperiton](https:\u002F\u002Fgithub.com\u002Fbenperiton)\n\n## License\n\n[ISC](https:\u002F\u002Fgithub.com\u002FRelaxedJS\u002FReLaXed\u002Fblob\u002Fmaster\u002FLICENCE.txt)\n","ReLaXed 是一个使用 Web 技术创建 PDF 文档的工具。它支持通过 HTML 或 Pug（一种 HTML 的简写形式）编写内容，并允许使用 CSS 和 JavaScript 定义复杂的布局，同时保持内容编写接近 Markdown 或 LaTeX 的简洁语法。项目基于 Chromium 引擎运行，能够生成高质量的 PDF 文件，适用于需要将网页内容转换为专业格式文档的各种场景，如书籍、简历、名片等。其开源性质（ISC 许可证）也使得开发者可以自由地对其进行扩展和定制。",2,"2026-06-11 03:33:03","high_star"]