automad/theme-skeleton
Composer 安装命令:
composer require automad/theme-skeleton
包简介
An Automad theme package skeleton including tutorial templates for developers
关键字:
README 文档
README
Important
Please use the new and modern theme starter kit instead of this repository in order to get started with a new theme.
You can use this package as a package skeleton for new Automad themes. It includes all files to get you started with your own themes quickly. However there is only one single template file with a simple tree menu. While its functionality is reduced to a minimum, it covers most aspects of theme developing regarding the Automad template language. The beautiful Bulma CSS framework is used to style the template and therefore this package doesn't include any CSS or JS files.
Included Templates
This package contains these simplified templates that only serve demonstrational purposes:
- The
page.phptemplate represents a basic page with a navbar, a content area and a sidebar with menu. - The
pagelist.phptemplate contains a filterable and sortable pagelist that can be used as a skeleton for blogs or portfolios. - The
session.phptemplate demonstrates the usage of session variables and thesetfunction. - The
images.phptemplate provides a minimal example of how to build a gallery template.
☝️ To see those templates in action while playing around just apply them to any page in your installation!
Development Workflow
This very detailed in-depth guide describes step by step the workflow of setting up and publish a new theme using Composer. You can probaly skip some of the points in case you have been working already with Composer in the past.
☝️ This guide assumes you're familiar with Visual Code Studio and working on a system with a Bash shell or similar — like macOS or Linux. However, it is of course possible to do the same on a Windows PC — just slightly different.
The Local Package
-
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
devwithin your home folder.cd ~/dev -
Create new skeleton theme in your
devdirectory using Composer.composer create-project automad/theme-skeleton my-theme -
Change to the new theme directory and edit the
composer.jsonandtheme.jsonfiles. VS Code is used here as the editor. At least change the vendor and theme name.cd my-theme code composer.jsonAlso edit the name in
theme.json.code theme.json -
Now change to your Automad root directory. For example
~/Sites/automad-site.cd ~/Sites/automad-site -
Edit the
composer.jsonfile of the Automad installation.code composer.jsonAdd the following snippet to Automad's composer file (note the path to your package).
{ ... "repositories": [ { "type": "path", "url": "~/dev/my-theme" } ], ... } -
Still in the Automad directory run the following Composer command.
composer require my-vendor/my-theme:@devNow 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.
-
Init new Git repository and commit files.
cd ~/dev/my-theme git init git add . git commit -m "First commit" -
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" -
Create a new repository on GitHub.
-
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.
automad/theme-skeleton 适用场景与选型建议
automad/theme-skeleton 是一款 基于 Hack 开发的 Composer 扩展包,目前已累计 1.7k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「theme」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 automad/theme-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 automad/theme-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 automad/theme-skeleton 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Bootstrap 4.x base theme for SilverStripe
Lucency Theme
Selectize Theme for Bootstrap 4
Ratchakarn theme for Yii Framework 2
AdminLTE backend theme asset bundle for Yii 2.0 Framework with Bootstrap 4
yii2-adminlte is a package for yii framework 2 that consists a very popular backend template AdminLTE (based on bootstrap 3).
统计信息
- 总下载量: 1.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-10