Basement Grotesque 开源项目使用教程
1. 项目目录结构及介绍
basement-grotesque/
├── LICENSE
├── README.md
├── fonts/
│ ├── BasementGrotesque-Black_web.woff
│ ├── BasementGrotesque-Black_web.woff2
│ └── BasementGrotesque-Black.otf
├── src/
│ ├── index.html
│ └── styles.css
└── package.json
- LICENSE: 项目的开源许可证文件。
- README.md: 项目的介绍文档,包含项目的基本信息和使用说明。
- fonts/: 存放字体文件的目录,包含不同格式的字体文件。
- src/: 项目的源代码目录,包含HTML和CSS文件。
- package.json: 项目的配置文件,包含项目的依赖和脚本信息。
2. 项目的启动文件介绍
项目的启动文件是 src/index.html
,这是一个基本的HTML文件,用于展示字体效果。文件内容如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basement Grotesque</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Basement Grotesque</h1>
<p>This is a sample text using the Basement Grotesque font.</p>
</body>
</html>
3. 项目的配置文件介绍
项目的配置文件是 package.json
,它包含了项目的依赖和脚本信息。文件内容如下:
{
"name": "basement-grotesque",
"version": "1.0.0",
"description": "A display typeface inspired by the expressiveness of early 19th-century grotesque typefaces.",
"main": "src/index.html",
"scripts": {
"start": "open src/index.html"
},
"repository": {
"type": "git",
"url": "git+https://github.com/basementstudio/basement-grotesque.git"
},
"keywords": [
"font",
"grotesque",
"display"
],
"author": "basement studio",
"license": "OFL-1.1",
"bugs": {
"url": "https://github.com/basementstudio/basement-grotesque/issues"
},
"homepage": "https://github.com/basementstudio/basement-grotesque#readme"
}
- name: 项目的名称。
- version: 项目的版本号。
- description: 项目的描述。
- main: 项目的入口文件。
- scripts: 项目的脚本命令,
start
命令用于启动项目。 - repository: 项目的代码仓库信息。
- keywords: 项目的关键词。
- author: 项目的作者。
- license: 项目的许可证。
- bugs: 项目的Bug跟踪地址。
- homepage: 项目的主页地址。