Download the PHP package marko/blog without Composer

On this page you can find all versions of the php package marko/blog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blog

marko/blog

WordPress-like blog for Marko — posts, authors, categories, tags, and threaded comments with email verification.

Installation

Required: A view driver (e.g., marko/view-latte) and a database driver (e.g., marko/database-mysql):

Quick Example

Once installed with a view and database driver, the blog works automatically:

  1. Run migrations to create tables: marko db:migrate
  2. Visit /blog to see the post list
  3. Visit /blog/{slug} to view a single post

View Templates

The blog package ships with Latte templates (via marko/view-latte) but supports any template engine.

Overriding Templates

You can override any blog template in your app module by creating a matching path under app/views/blog/. The app module's view path takes precedence, allowing full control over rendering without modifying the package.

For example, to override the post list template:

Alternative View Engines

To use a different template engine such as Blade or Twig, install the corresponding view driver package and register your own view implementations via Preferences. Any view driver implementing the view contract works.

Configuration

Publish or set the following keys in your config:

Key Default Description
posts_per_page 10 Number of posts shown per page
comment_max_depth 3 Maximum thread depth for nested comments
comment_rate_limit_seconds 60 Minimum seconds between comments from one user
verification_token_expiry_days 7 Days before a comment verification token expires
route_prefix /blog URL prefix for all blog routes

Extensibility

Preferences (Swap Implementations)

Use the #[Preference] attribute to swap any blog class with your own implementation. This lets you replace or override core behavior without forking:

Plugins (Hook Methods)

Use #[Plugin] with #[Before] and #[After] attributes to hook into any public method without overriding the entire class:

Observers (React to Events)

Use #[Observer] to react to blog lifecycle events without modifying core classes:

Observers are ideal for event-driven side effects such as sending emails, clearing caches, or syncing to external services. Use an observer for every event reaction you need to add.

Available Events

The blog dispatches the following lifecycle events:

Event Trigger
PostCreated A new post is created
PostUpdated A post is updated
PostPublished A post is published
PostDeleted A post is deleted
CommentCreated A new comment is submitted
CommentVerified A comment email is verified
CommentDeleted A comment is deleted
CategoryCreated A new category is created
TagCreated A new tag is created
AuthorCreated A new author is created

Routes

The blog registers the following public routes (prefix configurable via route_prefix):

Method Path Description
GET /blog Post list Paginated list of published posts
GET /blog/{slug} Post detail Single post view
GET /blog/category/{slug} Category archive Posts filtered by category
GET /blog/tag/{slug} Tag archive Posts filtered by tag
GET /blog/author/{slug} Author archive Posts filtered by author
GET /blog/search Search results Full-text post search
POST /blog/{slug}/comment Submit comment Submit a comment on a post
GET /blog/comment/verify/{token} Verify comment Verify a comment via email token

CLI Commands

Command Description
blog:publish-scheduled Publish any posts whose scheduled publish date has passed
blog:cleanup Remove expired verification tokens and other stale data

Documentation

Full usage, configuration, events, API reference, and examples: marko/blog


All versions of blog with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
marko/core Version self.version
marko/routing Version self.version
marko/database Version self.version
marko/view Version self.version
marko/cache Version self.version
marko/mail Version self.version
marko/config Version self.version
marko/session Version self.version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marko/blog contains the following files

Loading the files please wait ...