GraphQL 项目教程
graphql.github.ioGraphQL Documentation at graphql.org项目地址:https://gitcode.com/gh_mirrors/gr/graphql.github.io
1. 项目的目录结构及介绍
GraphQL 项目的目录结构如下:
graphql.github.io/
├── _data/
├── _includes/
├── _layouts/
├── _plugins/
├── _posts/
├── _sass/
├── assets/
├── css/
├── docs/
├── img/
├── js/
├── pages/
├── spec/
├── tools/
├── _config.yml
├── Gemfile
├── Gemfile.lock
├── index.md
└── 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、标题、描述、作者等信息。
配置文件示例:
title: GraphQL
description: GraphQL Documentation
baseurl: ""
url: "https://graphql.org"
author: GraphQL Foundation
markdown: kramdown
highlighter: rouge
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-sitemap
exclude:
- Gemfile
- Gemfile.lock
- vendor
这个配置文件定义了站点的标题、描述、基础 URL 等信息,并配置了 Markdown 解析器和一些 Jekyll 插件。
graphql.github.ioGraphQL Documentation at graphql.org项目地址:https://gitcode.com/gh_mirrors/gr/graphql.github.io
1