gustavomartinez / gmblog
gmblog
v0.0.4
2021-08-18 00:56 UTC
Requires
- league/flysystem-aws-s3-v3: ^1.0
- themsaid/wink: ^1.2.0
Requires (Dev)
- orchestra/testbench: ^6.13
- phpunit/phpunit: ^9.3
- spatie/laravel-ray: ^1.9
This package is auto-updated.
Last update: 2024-09-18 08:05:14 UTC
README
Blog UI wrapper for the Laravel Wink package.
安装
您可以通过composer安装此包
composer require gustavomartinez/gmblog
用法
此包需要两个不同的布局来渲染帖子列表和帖子内容,在您的项目中创建这些blade布局,并在其中定义一些将要显示内容的区域。
帖子列表
<!-- resources/layouts/blog.blade.php -->
@yield('blog')
帖子内容
<!-- resources/layouts/post.blade.php -->
@yield('post')
将此stack
添加到您的基布局中,以渲染单个帖子页面的元字段。
@stack('meta')
博客样式
此包使用Tailwindcss实用工具进行样式设置,因此您需要安装和设置tailwindcss以样式化博客。您需要在tailwind.config.js
文件中添加@tailwindcss/typography
插件。
您还应在tailwindcss的purge
数组中包含此路径。
purge: [ "../packages/gmblog/**/*.php", // ... ];
颜色
这不是强制性的,但您可以在tailwind.config.js
文件中添加和自定义这些颜色。
{ theme: { extend: { colors: { // Share buttons colors facebook: "#3B5998", twitter: "#38A1F3", // Main accent color primary: colors.blue, // ... } } } }
翻译
所有文本都可以使用翻译字符串作为键进行翻译。
/* lang/en.json */ { "Read more": "Read more", }
配置
您可以通过配置文件自定义此包的一些行为。
php artisan vendor:publish --tag=config --provider='Gmblog\GmblogServiceProvider'