inuitviking/imms 问题修复 & 功能扩展

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

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

inuitviking/imms

Composer 安装命令:

composer create-project inuitviking/imms

包简介

Fully automatic SSG. Host this somewhere, forget about it, have your static content up to date, always.

README 文档

README

pipeline status latest release

Total Downloads PHP Version Require License

IMMS is a kind of SSG (Static Site Generator), but without you having to build it yourself and entirely without pipelines.

It takes your Markdown and renders it as HTML in a file cache, and serves this HTML without having to re-render it again. This makes IMMS pretty fast at serving content.

If you have HTML files instead of Markdown files, it will simply stitch the HTML content together with overall template files, and cache the final result. Again, making IMMS pretty fast at serving content.

If you need help or want to learn more, please check out the wiki.

Intended use cases

  • To serve a repository with Markdown or HTML files (such as a GitHub/GitLab wiki!)
  • To serve as an SFTP server for your old pals to host their static HTML (docker image supports this out of the box!)
  • Other semi- to fully static content

There's quite literally no fuss (or very little of it):

  • No database
  • No users that need to log in
  • No need for manual cache handling
  • No built-in editors

Features

  • GitHub Flavoured Markdown
    • This is just the base; it should have almost full support for Gitlab Flavoured Markdown as well
  • Header Permalinks
  • Syntax highlighting for code blocks
  • Hints
  • Text Highlighting (Remember those yellow highlighters?)
  • YouTube iframes
  • Video (.webm, .mp4, .mov, .ogv)
  • Emojis
  • Image attributes (size them however you want!)
  • WikiLinks
  • Sub pages
    • Create a directory with the same name of a Markdown file
    • Add Markdown files into the directory
    • IMMS will link the Markdown file and directory together automatically.
  • Support for special characters in the Markdown file name
  • Table of Contents (configurable!)
  • Automatic caching (and clearing of it!)
  • A (albeit quite simple) CLI tool
  • Lazy image loading
  • Integrated git (this feature must be enabled in config)
  • You can feed it HTML or Markdown; it doesn't matter, it will handle it.
  • Custom templates (using Plates!)
  • Custom plugins!
  • Custom themes!
  • Custom events!

Additional features in Docker

  • Makes use of PHP's opcache to improve performance
  • Makes use of Apache's built-in caching, to serve files even faster

Getting started

Docker Compose

An example could be like so:

services:
  imms:
    image: registry.gitlab.com/inuitviking/imms:latest
    ports:
      - 8080:80
      - 2222:2222
    #    expose:
    #      - 1234
    #      - 2222
    environment:
      - APACHE_PORT=1234
      - APACHE_CACHE_AGE=900
      - APACHE_CACHE_SIZE=5M
      - SSH_PORT=2222
      - SSH_USER=imms
      - SSH_PASS=imms
    volumes:
      - ./.docker/documents:/var/www/src/documents
      - ./.docker/config:/var/www/config
  • ./.docker/documents: The place where you store your uploads and markdown files.
  • ./.docker/config: This is where the config.ini file is stored

All of the above is supplied in .docker as examples.

You may also see the Apache config and PHP config within .docker; this is used for building the docker image, to configure opcache and Apache's built-in cache.

The docker image provided makes use of opcache and Apache's included caching system to improve response time.

If you prefer to use the built-in git, you can omit the "documents" volume, as IMMS would then handle the pulling internally.

On a good ol' web server

composer create-project inuitviking/imms
cd imms

Once created, you can configure it to pull HTML/Markdown from a remote repository in config/config.ini.

If you prefer not to do that, make sure to create the necessary directories:

mkdir -p src/documents
touch src/documents/index.md

You may want to take a look at config/config.ini to adjust to your liking.

Dependencies

Composer dependencies:

PHP dependencies

  • PHP8.3 or newer
  • ext-dom

Server dependencies

inuitviking/imms 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-02-26