Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docsify-docx-converter

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsify-docx-converter

A tool for building docx based on your docsify project

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

docsify-docx-converter

📖 A tool for building docx based on your docsify project

Install

npm install --save-dev docsify-docx-converter

Usage

Create config file .docsifytodocxrc.js in your project root directory.

module.exports = {
  /** "table of contents" file path */
  contents: '_sidebar.md',

  /** Whether to enable title degradation, if enabled, replace <h1> with <h2>, <h2> with <h3>, and so on. */
  titleDowngrade: true,

  /** Document root directory */
  rootPath: './docs',

  /** Path where docx will stored */
  pathToPublic: './README.docx',

  /**
   * The maximum width of the image in the document, and the height will be adaptive according to the width.
   * The default is 468, which is the maximum width of a word document.
   */
  imgMaxWidth: 468,

  /** The title of the cover page. */
  coverTitle: null,

  /** The style of the body. */
  bodyStyles: 'font-family: 微软雅黑;',

  /** landscape or portrait (default) */
  orientation: 'portrait',

  /** map of margin sizes
   * expressed in twentieths of point, see WordprocessingML documentation for details):
   * http://officeopenxml.com/WPSectionPgMar.php
   * */
  margins: {}
};

Add script into package.json:

{
  "scripts": {
    "convert": "node_modules/.bin/docsify-docx-converter"
  }
}

Run converter:

npm run convert

Keywords

FAQs

Package last updated on 25 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc