首页 技术 正文
技术 2022年11月16日
0 收藏 360 点赞 4,229 浏览 1589 个字

Package.json

The package.json file is a set of meta data about a theme.

package.json 文件是一组关于主题的元数据。

Overview概述

The package.json file is a required file and sets some information about your theme. Edit this file and keep it up to date with the relevant information about your publication’s theme.

To reference a working example of a package.json file, review the Casper file, and for further information about specific details of package.json handling, read the npm docs.

package.json文件是一个必需的文件,它设置了一些关于主题的信息。编辑此文件并使其与您的出版物的主题相关信息保持最新。

以引用包package.json文件的工作示例,查看Casper文件,了解包的详细信息。json处理,阅读npm docs

Example

package.json

{
"name": "your-theme-name",
"description": "A brief explanation of your theme",
"version": "0.5.0",
"engines": {
"ghost-api": "v3"
},
"license": "MIT",
"author": {
"email": "your@email.here"
},
"config": {
"posts_per_page": 10,
"image_sizes": {}
}
}

The data in the file must be valid JSON, including double quotes around all property names. Every property except the last one should be separated by a comma.

文件中的数据必须是有效的JSON,包括所有属性名周围的双引号。除了最后一个属性外,所有属性之间都应该用逗号分隔

Additional properties额外的属性

Here are some of the most common optional properties that can be used in the package.json file:

下面是可以在包中使用的一些最常见的可选属性package.json 文件:

  • config.posts_per_page -每页的缺省文章数为5,或者您可以使用此属性设置自定义数量   the default number of posts per page is 5, or you can set a custom amount with this property
  • config.image_sizes -详情请参阅响应图像指南 read the responsive images guide for more details
  • engines.ghost-api – 说明您的主题与Ghost内容API的哪个版本兼容,默认为v0.1  indicate what version of the Ghost Content API your theme is compatible with, defaults to v0.1
  • description – 提供一个关于你的主题的简短描述,以及它的独特之处 provide a short description about your theme and what makes it unique
  • license – 一个有效的许可证字符串,我们推荐MIT a valid licence string, we recommend MIT 
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,906
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,430
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,247
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,058
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,690
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,727