GraphQL 项目教程

随笔3周前发布 心动
35 0 0

GraphQL 项目教程

graphql.github.ioGraphQL Documentation at graphql.org项目地址:https://gitcode.com/gh_mirrors/gr/graphql.github.io

1. 项目的目录结构及介绍

GraphQL 项目的目录结构如下:

  1. graphql.github.io/

  2. ├── _data/

  3. ├── _includes/

  4. ├── _layouts/

  5. ├── _plugins/

  6. ├── _posts/

  7. ├── _sass/

  8. ├── assets/

  9. ├── css/

  10. ├── docs/

  11. ├── img/

  12. ├── js/

  13. ├── pages/

  14. ├── spec/

  15. ├── tools/

  16. ├── _config.yml

  17. ├── Gemfile

  18. ├── Gemfile.lock

  19. ├── index.md

  20. └── README.md

目录介绍:

  • _data/: 存储项目的数据文件。
  • _includes/: 存储可重用的 HTML 片段。
  • _layouts/: 存储页面的布局模板。
  • _plugins/: 存储 Jekyll 插件。
  • _posts/: 存储博客文章。
  • _sass/: 存储 SASS 样式文件。
  • assets/: 存储静态资源文件。
  • css/: 存储 CSS 样式文件。
  • docs/: 存储文档文件。
  • img/: 存储图像文件。
  • js/: 存储 JavaScript 文件。
  • pages/: 存储页面文件。
  • spec/: 存储规范文件。
  • tools/: 存储工具文件。
  • _config.yml: 项目的配置文件。
  • Gemfile: 项目的依赖文件。
  • Gemfile.lock: 项目的依赖锁定文件。
  • index.md: 项目的首页文件。
  • README.md: 项目的说明文件。

2. 项目的启动文件介绍

项目的启动文件是 index.md,它位于项目根目录下。这个文件是项目的首页,包含了项目的基本介绍和导航链接。

3. 项目的配置文件介绍

项目的配置文件是 _config.yml,它位于项目根目录下。这个文件包含了 Jekyll 项目的配置信息,如站点的基础 URL、标题、描述、作者等信息。

配置文件示例:

  1. title: GraphQL

  2. description: GraphQL Documentation

  3. baseurl: ""

  4. url: "https://graphql.org"

  5. author: GraphQL Foundation

  6. markdown: kramdown

  7. highlighter: rouge

  8. plugins:

  9. - jekyll-feed

  10. - jekyll-seo-tag

  11. - jekyll-sitemap

  12. exclude:

  13. - Gemfile

  14. - Gemfile.lock

  15. - vendor

这个配置文件定义了站点的标题、描述、基础 URL 等信息,并配置了 Markdown 解析器和一些 Jekyll 插件。

graphql.github.ioGraphQL Documentation at graphql.org项目地址:https://gitcode.com/gh_mirrors/gr/graphql.github.io

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...