承接 bangnokia/lina 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bangnokia/lina

最新稳定版本:v0.6.7

Composer 安装命令:

composer require bangnokia/lina

包简介

static blog generator

README 文档

README

lina's logo

Lina PHP - lightweight and blazing fast static blog generator

Lina is an opinionated flat-file CMS for who want a simple and fast blog. Lina uses Blade template engine, so you can use all Blade features.

Features

  • Blazing fast: Lina is a lightweight and superfast static blog generator.
  • Written in PHP: so if you hate Javascript, Lina is for you.
  • Blade template engine: you can use all Blade features.'
  • Minimalistic: Lina is a static blog generator. It's not a full-fledged CMS.
  • Deploy everywhere! You know, just html files 🤣

Requirements

  • PHP 8.3

Getting started

There are some ways to install Lina:

Require Lina as dependency, with this option, you can keep lina up-to-date easily.

mkdir my-blog && cd my-blog && composer init --name=linaphp/blog --no-interaction --require=bangnokia/lina:^0.5 && composer install
./vendor/bin/lina new . # scaffolding a new blog skeleton in the current directory
./vendor/bin/lina serve # start a development server and happy writing

Or install Lina as global composer package

composer global require linaphp/lina
lina new my-blog
lina serve

Or you can use the phar file

curl -LO https://github.com/linaphp/lina/releases/latest/download/lina.phar && chmod +x lina.phar

Folder structure

In case you want to migrate from another blog platform, you can check the base structure of Lina

content/
    posts/
        2020-11-01-hello.md
    index.md
resources/
    views/
        index.blade.php
        post.blade.php
public/ 
    images/
    style.css
  • content directory is where you store your markdown content file.
  • resources/views directory is where you store your blade template.
  • public directory is where you store your assets like images, css, ... This folder is also where all the generated files are stored. So please remember to add your custom files to .gitignore if you want to store them in git

We really recommend you to prefix your content file with the date, so it will easy to sort and find your content. Lina automatically strip the date from the slug, so you don't need to worry about the url.

Helper functions

There are some functions that you can use to programmatically access your content.

Get all content in a directory

Get all the content in a directory. The content will be sorted by the date in the filename.

foreach (lina()->index('post') as $post) {
    echo $post->title;
}

Get a single content

$post = lina()->get('posts/2020-11-01-hello.md');

Deployments

Lina can be deployed to any static hosting provider. Here are some examples: Github pages, Netlify, Vercel, Cloudflare pages, ...

Deploy on Github pages

So you please modify the file .github/workflows/deploy.yml to match your demand.

Deploy on Cloudflare pages

We also provide a configuration file for Cloudflare pages. You can find it in cloudflare-page.sh. You can modify it to match your demand. Also you need to change the Build configuration like this. Cloudflare deploy

Built with Lina

So, you know, at least that's me.

TODO

  • Add lina serve command for development
  • Add code highlighter support
  • Support live reloading
  • Cloudflare pages support

bangnokia/lina 适用场景与选型建议

bangnokia/lina 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 66 次下载、GitHub Stars 达 6, 最近一次更新时间为 2024 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cli」 「console」 「laravel」 「Laravel Zero」 「pekyll」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bangnokia/lina 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bangnokia/lina 我们能提供哪些服务?
定制开发 / 二次开发

基于 bangnokia/lina 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-23