cecil/theme-docs

Cecil 主题文档

资助包维护!
ArnaudLigny
Open Collective

安装次数: 871

依赖者: 1

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

语言:CSS

类型:cecil-theme


README

Cecil 提供的文档主题,由 Tailwind CSSAlgolia DocSearch 支持。

Screenshot

功能

  • 自动生成的导航侧边栏
  • Algolia DocSearch 集成
  • 内容本地化(l10n)就绪
  • 模板国际化(i18n)
  • 移动端友好
  • 暗色主题
  • 博客文章模板

安装

composer require cecil/theme-docs

或者 下载最新存档 并将其内容解压到 themes/docs 目录。

用法

config.ymltheme 部分添加 docs

theme:
  - docs

配置

sidebar:
  - <group>
  - <group>
footer: Copyright © %author%
github:
  repo: https://github.com/<org>/<repo>
  branch: <main|master>
docsearch:
  enabled: true|false
  appId: <YOUR_APP_ID>
  indexName: <YOUR_INDEX_NAME>
  apiKey: <YOUR_SEARCH_API_KEY>
  debug: false|true

自定义样式

创建 Tailwind 配置 文件 tailwind.config.js

// uncomment to define custom colors
//const colors = require('tailwindcss/colors');

module.exports = {
  presets: [
    require('./themes/docs/tailwind.preset.js')
  ],
  content: [
    './layouts/**/*.html.twig',
    './themes/**/layouts/**/*.html.twig',
  ],
  // uncomment to define custom colors
  /*theme: {
    extend: {
      // https://tailwind.org.cn/docs/customizing-colors
      colors: {
        primary: colors.blue,
        secondary: colors.slate,
      },
    },
  }*/
}

运行以下命令

npm install -D tailwindcss
npx tailwindcss -i ./themes/docs/tailwind.css -o ./assets/styles.css

开发

安装依赖

npm install

重新构建 CSS

npx tailwindcss -c ./tailwind.preset.js -i ./tailwind.css -o ./assets/styles.css

许可证

Docs 主题是免费软件,根据 MIT 许可证条款分发。

© Arnaud Ligny