heimfisch/blogtheme 问题修复 & 功能扩展

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

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

heimfisch/blogtheme

Composer 安装命令:

composer require heimfisch/blogtheme

包简介

A simple Bootstrap based Blog Theme. Check out the demo page and all available templates https://dev.heinisch-design.de/demo/blogtheme.

关键字:

README 文档

README

Caution

This Theme is under development

BlogTheme for Automad

This is a simple Bootstrap based theme with 3 layouts and an optional sidebar. This theme has a light and a dark mode.

Included Templates

This package contains these simplified templates that only serve demonstrational purposes:

  1. The page.php template represents a basic page with a navbar, a content area and a sidebar with menu.
  2. The post.php template contains a filterable and sortable pagelist that can be used as a skeleton for blogs or portfolios.
  3. The blog.phptemplate demonstrates the usage of session variables and the set function.

Also included is a navbar with some options

☝️ To see those templates in action while playing around just apply them to any page in your installation!

Dark Light Mode

This template detecte the operation system prefert dark or light mode and use it.

<script>
    (function () {
        const htmlElement = document.querySelector("html")
        if(htmlElement.getAttribute("data-bs-theme") === 'auto') {
        function updateTheme() {
            document.querySelector("html").setAttribute("data-bs-theme",
            window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light")
        }
            window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', updateTheme)
        updateTheme()
        }
    })();	
</script>

You can disable the feature in the settings.

The Local Package

  1. It's a good practice to start developing a new package outside of the Automad packages directory. Therefore change to some directory outside of Automad where you want to develop your new theme. Let's assume you want to put your package into a directory called dev within your home folder.

    cd ~/dev
    
  2. Create new skeleton theme in your dev directory using Composer.

    composer create-project automad/theme-skeleton my-theme
    
  3. Change to the new theme directory and edit the composer.json and theme.json files. VS Code is used here as the editor. At least change the vendor and theme name.

    cd my-theme
    code composer.json
    

    Also edit the name in theme.json.

    code theme.json
    
  4. Now change to your Automad root directory. For example ~/Sites/automad-site.

    cd ~/Sites/automad-site
    
  5. Edit the composer.json file of the Automad installation.

    code composer.json
    

    Add the following snippet to Automad's composer file (note the path to your package).

    {
        ...	
        "repositories": [
            {
                "type": "path",
                "url": "~/dev/my-theme"
            }
        ],
        ...
    }
    
  6. Still in the Automad directory run the following Composer command.

    composer require my-vendor/my-theme:@dev
    

    Now your theme is available in Automad and you can start developing your templates. After all the setup it's now time to create a repository for your theme.

Create a Git Repository

When developing is done, it's time to publish your work.

  1. Init new Git repository and commit files.

    cd ~/dev/my-theme
    git init
    git add .
    git commit -m "First commit"
    
  2. Create a first release tag for your finished theme following the semantic versioning scheme.

    git tag -a 1.0.0 -m "my version 1.0.0"
    
  3. Create a new repository on GitHub.

  4. Now, add its URL as a remote to your local repository and push changes. When creating a repository, the URL will be printed on the GitHub page.

    git remote add origin /remote/URL/of/your/new/repo
    git push -u origin master
    

Register Your Package

Now it's time to submit your theme package to Packagist. After succseffuly registering it, it will automatically show up in the package browser.

Cheat Sheets

In case you prefer to start developing a theme or extension without reading the full documention, the Cheat Sheets are a good point to start.

heimfisch/blogtheme 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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