dulce/statamic-adobe-fonts 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dulce/statamic-adobe-fonts

最新稳定版本:v1.2.0

Composer 安装命令:

composer require dulce/statamic-adobe-fonts

包简介

Manage self-hosted Adobe Typekit Fonts in Statamic

README 文档

README

Statamic 5.0+ Statamic Google Fonts on Packagist

Statamic Adobe Fonts is a Statamic addon that makes self-hosting Adobe Typekit Fonts as frictionless as possible for Statamic users.

Features

This addon provides:

  • Self-hosting of Adobe Typekit Fonts on your own server.
  • Ability to customize which Adobe Typekit Fonts are hosted.

Installation

You can install this addon from the Tools > Addons section of the Statamic control panel by searching for "Adobe Fonts" and clicking install. Alternatively, you can run the following command from your project root:

composer require dulce/statamic-adobe-fonts

After the package is installed, you can publish the configuration file with:

php artisan vendor:publish --provider="Dulce\StatamicAdobeFonts\ServiceProvider"

This will create a statamic-adobe-fonts.php config file in your config directory.

Configuration

To load fonts in your application, register an Adobe Typekit Fonts embed URL in the statamic-adobe-fonts.php config file:

// config/adobe.typekit.php

return [
    'fonts' => [
        'default' => 'https://use.typekit.net/[project-id].css',
    ],
];

Replace [project-id] with your actual project ID from Adobe Typekit.

Usage

Once the addon is installed, you can configure which Adobe Fonts you want to use by editing the statamic-adobe-fonts.php config file in your config directory.

In your Antlers templates, you can use the provided Antlers tag to include the necessary CSS for the Adobe Fonts:

 {{ typekit }}

This tag will output the necessary CSS link to include the Adobe Fonts in your website.

To use an Adobe Font in your website, simply use the font's name in your CSS. For example:

body {
    font-family: 'Adobe Caslon Pro', serif;
}

Please refer to the Adobe Fonts documentation for a complete list of available fonts and their corresponding CSS classes.

统计信息

  • 总下载量: 649
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-24