https://github.com/caomeiyouren/hexo-banner
Add a custom banner at the top of each page that supports HTML and Markdown formatted text content.在每个页面的顶部添加一个自定义的 Banner,支持 HTML 和 Markdown 格式的文本内容。
https://github.com/caomeiyouren/hexo-banner
banner hexo hexo-banner hexo-plugin
Last synced: 3 months ago
JSON representation
Add a custom banner at the top of each page that supports HTML and Markdown formatted text content.在每个页面的顶部添加一个自定义的 Banner,支持 HTML 和 Markdown 格式的文本内容。
- Host: GitHub
- URL: https://github.com/caomeiyouren/hexo-banner
- Owner: CaoMeiYouRen
- License: mit
- Created: 2024-10-17T13:38:55.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-16T07:19:13.000Z (9 months ago)
- Last Synced: 2025-07-03T23:43:13.137Z (4 months ago)
- Topics: banner, hexo, hexo-banner, hexo-plugin
- Language: TypeScript
- Homepage: https://blog.cmyr.ltd/
- Size: 234 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
hexo-banner
> Add a custom banner at the top of each page that supports HTML and Markdown formatted text content.
>
> 在每个页面的顶部添加一个自定义的 Banner,支持 HTML 和 Markdown 格式的文本内容。## 🏠 主页
[https://github.com/CaoMeiYouRen/hexo-banner#readme](https://github.com/CaoMeiYouRen/hexo-banner#readme)
## 📦 依赖要求
- node >=16
## 🚀 安装
```sh
npm install hexo-banner
```## 👨💻 使用
在 `_config.yml` 中进行如下配置。
```yml
banner:
content: |
# 这是一段 banner
position: top
styles:
background-color: #f8f8f8
color: #333
css: |
@media (min-width: 768px) {
.hexo-banner {
margin-left: 240px;
}
}
```| 属性 | 描述 | 类型 | 可选值 |
| -------- | ------------------------------------------------------------ | ------ | -------------------- |
| `content` | 支持 Markdown 的内容。 | string | - |
| `position` | 插入位置,支持插入到 header 或 footer 中。 | string | `top` \| `bottom` |
| `styles` | 设置行内样式,对象类型。 | object | - |
| `css` | 设置 CSS,字符串类型。 | string | - |## 🛠️ 开发
```sh
npm run dev
```## 🔧 编译
```sh
npm run build
```## 🔍 Lint
```sh
npm run lint
```## 💾 Commit
```sh
npm run commit
```## 👤 作者
**CaoMeiYouRen**
* Website: [https://blog.cmyr.ltd/](https://blog.cmyr.ltd/)
* GitHub: [@CaoMeiYouRen](https://github.com/CaoMeiYouRen)
## 🤝 贡献
欢迎 贡献、提问或提出新功能!
如有问题请查看 [issues page](https://github.com/CaoMeiYouRen/hexo-banner/issues).
贡献或提出新功能可以查看[contributing guide](https://github.com/CaoMeiYouRen/hexo-banner/blob/master/CONTRIBUTING.md).## 💰 支持
如果觉得这个项目有用的话请给一颗⭐️,非常感谢
## 🌟 Star History
[](https://star-history.com/#CaoMeiYouRen/hexo-banner&Date)
## 📝 License
Copyright © 2024 [CaoMeiYouRen](https://github.com/CaoMeiYouRen).
This project is [MIT](https://github.com/CaoMeiYouRen/hexo-banner/blob/master/LICENSE) licensed.***
_This README was generated with ❤️ by [cmyr-template-cli](https://github.com/CaoMeiYouRen/cmyr-template-cli)_