minetro/simple-blogger

此包已被弃用,不再维护。作者建议使用 blogette/platform 包。

基于 Nette 的简单静态博客程序

0.1.2 2015-05-07 13:28 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:47:25 UTC


README

68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77 68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534

网站 🚀 contributte.org | 联系 👨🏻‍💻 f3l1x.io | Twitter 🐦 @contributte

免责声明

⚠️ 此项目不再维护。请使用 contributte/webapp-skeleton
Composer minetro/simple-blogger
版本
PHP
许可证

基于 Nette 的简单静态博客程序。

此项目已过时。请使用更好的解决方案 blogette/platform

用法

BloggerExtension 注册到其他扩展中。

extensions:
	blog: Minetro\Blog\Simple\DI\BloggerExtension

您必须设置 Nette\Utils\Finder 搜索 文章 的文件夹。

blog:
	posts: %appDir%/data

文章

文章由两部分组成。 Meta 文件和 content 文件。

Meta文件

假设我们有一个文件在 data/201505/post.neon。所有元文件必须具有 neon 扩展名。

查看示例元文件。

id: 1
date: 06.05.2015
title: Some cool title
post: %file%/post.md

seo:
	title: 'Best framework in the world'
	keywords: 'nette, php, framework'
	description: 'Nothing to say. It's a fact.'

tags:
	- php

config:
	comments: yes
	social: yes
	parser: parsedown

必需的属性是 iddatetitlepost

Post 是指向您的 content 文件的目标。内容文件可以是 .md.latte 或任何其他格式。但您必须指定解析器。在这种情况下,它是 parsedown。

模型

PostsService

要获取所有文章、单个文章、排序文章或过滤文章,请使用 PostsService

->findAll(Configuration $c) - 返回文章数组。

->fetch(Configuration $c) - 返回单个文章或无。

配置

有 3 个对象。 CriteriaSorterPaginator

Criteria - 用于文章过滤(排除)

Sorter - 用于文章排序

Paginator - 扩展了经典的 Nette\Utils\Paginator

视图

视图不是此库的一部分。您必须自行显示文章。

开发

此包由以下作者维护。

538058?v=3&s=80

请考虑支持contributte开发团队。也感谢您使用此包。