AMP-Jekyll 项目教程

AMP-Jekyll 项目教程

amp-jekyllBuild Accelerated Mobile Page versions of your Jekyll posts项目地址:https://gitcode.com/gh_mirrors/am/amp-jekyll

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

AMP-Jekyll 项目的目录结构如下:

amp-jekyll/
├── _config.yml
├── _includes/
├── _layouts/
├── _plugins/
├── _posts/
├── assets/
├── Gemfile
├── Gemfile.lock
├── index.html
└── README.md

目录介绍:

  • _config.yml: 项目的配置文件。
  • _includes/: 包含可重用的 HTML 片段。
  • _layouts/: 包含页面的布局模板。
  • _plugins/: 包含 Jekyll 插件。
  • _posts/: 包含博客文章。
  • assets/: 包含静态资源,如 CSS、JavaScript 和图像。
  • GemfileGemfile.lock: 定义项目的依赖关系。
  • index.html: 网站的首页。
  • README.md: 项目的说明文档。

2. 项目的启动文件介绍

项目的启动文件主要是 index.html_config.yml

index.html

index.html 是网站的首页,它定义了网站的入口点。通常包含以下内容:

---
layout: default
---
<h1>Welcome to AMP-Jekyll</h1>
<p>This is the homepage of your AMP-Jekyll site.</p>

_config.yml

_config.yml 是 Jekyll 的主要配置文件,包含网站的基本设置,如标题、描述、URL 等。示例如下:

title: AMP-Jekyll
description: A Jekyll plugin to generate Accelerated Mobile Pages (AMP).
url: "https://example.com"

3. 项目的配置文件介绍

_config.yml

_config.yml 是 Jekyll 的主要配置文件,包含以下关键配置项:

  • title: 网站的标题。
  • description: 网站的描述。
  • url: 网站的 URL。
  • plugins: 启用的插件列表。

示例配置:

title: AMP-Jekyll
description: A Jekyll plugin to generate Accelerated Mobile Pages (AMP).
url: "https://example.com"
plugins:
  - jekyll-amp

Gemfile

Gemfile 定义了项目的依赖关系,包括 Jekyll 和其他插件。示例如下:

source "https://rubygems.org"

gem "jekyll"
gem "jekyll-amp"

通过这些配置文件,可以定制和启动 AMP-Jekyll 项目。

amp-jekyllBuild Accelerated Mobile Page versions of your Jekyll posts项目地址:https://gitcode.com/gh_mirrors/am/amp-jekyll

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

井隆榕Star

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值