docsify/docs/cover.md
John Hildenbiddle 4ae87bb18b
build: v5 updates and refactors (#2428)
* Update JS build

- Change rollup build from API to config file
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add banner comment to bundles
- Add unminified plugin bundles

* Update docs with v5 version lock and dist path

* Update docs to reference minified themes

* Clean up docs

* Update CSS build

- Change CSS build from API to CLI
- Change output dir from lib to dist
- Update lib to dist path in related files
- Update dependencies
- Add sourcemaps

* Update dependencies

* Clean up package.json and add keywords

* Fix rimraf globs on Windows

* Fix PostCSS CLI glob on Windows

* Update test-related dependencies

* Update emoji

* Add engines prop to package.json
2024-05-21 15:19:21 -05:00

1.8 KiB

Cover

Activate the cover feature by setting coverpage to true. See coverpage configuration.

Basic usage

Set coverpage to true, and create a _coverpage.md:

<!-- index.html -->

<script>
  window.$docsify = {
    coverpage: true,
  };
</script>
<script src="//cdn.jsdelivr.net/npm/docsify@5/dist/docsify.min.js"></script>
<!-- _coverpage.md -->

![logo](_media/icon.svg)

# docsify <small>3.5</small>

> A magical documentation site generator.

- Simple and lightweight
- No statically built html files
- Multiple themes

[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsify)

Custom background

The background color is generated randomly by default. You can customize the background color or a background image:

<!-- _coverpage.md -->

# docsify <small>3.5</small>

[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#quick-start)

<!-- background image -->

![](_media/bg.png)

<!-- background color -->

![color](#f0f0f0)

Coverpage as homepage

Normally, the coverpage and the homepage appear at the same time. Of course, you can also separate the coverpage by onlyCover option.

Multiple covers

If your docs site is in more than one language, it may be useful to set multiple covers.

For example, your docs structure is like this

.
└── docs
    ├── README.md
    ├── guide.md
    ├── _coverpage.md
    └── zh-cn
        ├── README.md
        └── guide.md
        └── _coverpage.md

Now, you can set

window.$docsify = {
  coverpage: ['/', '/zh-cn/'],
};

Or a special file name

window.$docsify = {
  coverpage: {
    '/': 'cover.md',
    '/zh-cn/': 'cover.md',
  },
};