# docsify-docx-converter

> A tool for building docx based on your docsify project

Latest version **1.0.1** (published 2024-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install docsify-docx-converter
pnpm add docsify-docx-converter
yarn add docsify-docx-converter
bun add docsify-docx-converter
```

Provides the commands `converter`, `docsify-docx-converter`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-09-25 |
| First published | 2023-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Simon Guo |
| Maintainers | simonguo |
| Keywords | docsify, docx, word, converter, cli |

## Links

- npm: https://www.npmjs.com/package/docsify-docx-converter
- Repository: https://github.com/simonguo/docsify-docx-converter
- Homepage: https://github.com/simonguo/docsify-docx-converter#readme
- Issues: https://github.com/simonguo/docsify-docx-converter/issues
- npm.io page: https://npm.io/package/docsify-docx-converter

## Dependencies (8)

- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [marked](https://npm.io/package/marked.md) ^4.3.0
- [rcfile](https://npm.io/package/rcfile.md) ^1.0.3
- [cheerio](https://npm.io/package/cheerio.md) 1.0.0-rc.12
- [package](https://npm.io/package/package.md) ^1.0.1
- [image-size](https://npm.io/package/image-size.md) ^1.0.2
- [html-docx-js](https://npm.io/package/html-docx-js.md) ^0.3.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-09-25
- 1.0.0 — 2023-04-25

## README

# 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.

```js
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

```

---
_Source: https://npm.io/package/docsify-docx-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
