Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vuepress/vuepress-plugin-migrate
🐾 Migrate any website to VuePress.
https://github.com/vuepress/vuepress-plugin-migrate
Last synced: 1 day ago
JSON representation
🐾 Migrate any website to VuePress.
- Host: GitHub
- URL: https://github.com/vuepress/vuepress-plugin-migrate
- Owner: vuepress
- License: mit
- Created: 2019-03-09T17:42:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-03-18T15:20:11.000Z (over 5 years ago)
- Last Synced: 2024-04-24T15:13:24.434Z (7 months ago)
- Language: JavaScript
- Homepage: https://vuepress.github.io/plugins/migrate.html
- Size: 93.8 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - vuepress/vuepress-plugin-migrate - 🐾 Migrate any website to VuePress. (others)
README
# [vuepress-plugin-migrate](https://vuepress.github.io/plugins/migrate.html)
[![npm](https://img.shields.io/npm/v/vuepress-plugin-migrate.svg)](https://www.npmjs.com/package/vuepress-plugin-migrate)
A [VuePress](https://vuepress.vuejs.org/) plugin which migrates a website to VuePress.
## CLI Commands
- **download:** crawl pages from the source site and store them in a local folder.
- **convert:** convert local HTML files to a markdown files and output them.
- **migrate:** execute both _download_ and _convert_ command in sequence.## Options
### targetDir
- **type:** `string`
- **default:** `'_posts'`The directory for generated markdown files.
### downloadDir
- **type:** `string`
- **default:** `'.vuepress/downloads'`The directory for downloaded HTMLs.
### maxConcurrentTasks
- **type:** `number`
- **default:** `10`The maximum number of concurrent downloads allowed.
### forceDownload
- **type:** `boolean`
- **default:** `false`Whether to force download a `.html` file when it already exists.
### forceConvert
- **type:** `boolean`
- **default:** `false`Whether to force overwrite a `.md` when it already exists.
### sitemap
- **type:** `string`
- **default:** `undefined`The sitemap URL for the source website.
### getFileName
- **type:** `(url: string) => string`
- **default:** `url => String(++index)`The name of the file to save as. If a falsy value is returned, the corresponding file is not downloaded.
### parseHTML
- **type:** `($: CheerioElement, render: ($: CheerioElement) => string) => ParsedResult`
- **default:** `undefined`Generates a function corresponding to the `ParsedResult` object from the crawled HTML. A `ParsedResult` is an object with the following properties:
```ts
interface ParsedResult {
frontmatter?: any
filename?: string
content?: string
}
```## Contribution
Contribution Welcome!