contentgecko/magecko

Magecko blog CMS module for Magento Open Source and Adobe Commerce.

Maintainers

Package info

github.com/ContentGecko/Magecko

Type:magento2-module

pkg:composer/contentgecko/magecko

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.6.0 2026-07-21 15:02 UTC

This package is auto-updated.

Last update: 2026-07-22 07:33:10 UTC


README

Magecko is a lightweight Magento blog CMS module. It provides admin-managed blog posts, a WYSIWYG HTML editor, featured images, inline article images through Magento media tools, SEO fields, store-view translations, frontend blog pages, and authenticated Magento Web API endpoints.

Features

  • Admin create, edit, and delete for blog posts
  • Draft and published post statuses
  • Paginated admin post list with ID column and title, status, category/topic, and author filters
  • Paginated storefront blog landing page
  • Store-scoped storefront enable switch, disabled by default for safe installation
  • Configurable frontend route for coexistence with existing blog extensions
  • Native Magento WYSIWYG HTML editor for default and translated article bodies
  • Featured image and featured image alt text
  • Metadata fields: slug, category/topic, author, publish date, modified date
  • SEO fields: meta title, meta description, and canonical URL override
  • Store-view translations for title, slug, category/topic, author, image alt text, body HTML, SEO fields, and canonical URL
  • Post-page canonical and hreflang link output
  • Storefront blog landing and post pages under the configured route
  • REST API CRUD endpoints and base64 media upload endpoint
  • Magento full-page-cache identities and cache invalidation on save/delete

Requirements

  • Magento Open Source or Adobe Commerce 2.4.x
  • PHP 8.2, 8.3, or 8.4
  • Admin or integration token for REST API access

Manual Installation

Copy this repository into:

app/code/Magecko/Blog

Then run:

bin/magento module:enable Magecko_Blog
bin/magento setup:upgrade
bin/magento cache:flush

In production mode, also run:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush

Composer Installation

Configure the public GitHub repository as a Composer VCS source:

composer config repositories.magecko vcs https://github.com/ContentGecko/Magecko.git
composer require contentgecko/magecko:^1.6
bin/magento module:enable Magecko_Blog
bin/magento setup:upgrade
bin/magento magecko:compatibility-check
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush

Admin

In Magento Admin, go to:

Content > Elements > Blog Posts

Storefront output is disabled after installation. Configure it at:

Stores > Configuration > General > Magecko Blog

For coexistence testing, choose an unused route such as magecko-test, save the configuration, then enable the storefront. Run the compatibility check again after enabling:

bin/magento magecko:compatibility-check

Testing

Run the package smoke suite from the Magento root after installing Magecko:

php vendor/contentgecko/magecko/Test/Integration/run-smoke.php
vendor/bin/phpunit --no-extensions -c dev/tests/unit/phpunit.xml.dist vendor/contentgecko/magecko/Test/Unit

The smoke suite creates temporary posts, verifies repository saves, admin filters, published-only collection behavior, and pagination, then removes its temporary data.

Documentation

REST API

All endpoints require a Magento admin or integration bearer token with access to Magecko_Blog::posts.

Get an admin token locally:

curl -X POST https://example.com/rest/V1/integration/admin/token \
  -H 'Content-Type: application/json' \
  -d '{"username":"admin","password":"password"}'

Endpoints:

GET    /rest/V1/magecko-blog/posts
GET    /rest/V1/magecko-blog/posts/{postId}
GET    /rest/V1/magecko-blog/posts/{postId}/store/{storeId}
GET    /rest/V1/magecko-blog/posts/slug/{slug}
GET    /rest/V1/magecko-blog/posts/store/{storeId}/slug/{slug}
POST   /rest/V1/magecko-blog/posts
PUT    /rest/V1/magecko-blog/posts/{postId}
PUT    /rest/V1/magecko-blog/posts/{postId}/store/{storeId}
DELETE /rest/V1/magecko-blog/posts/{postId}
DELETE /rest/V1/magecko-blog/posts/{postId}/store/{storeId}
POST   /rest/V1/magecko-blog/media

Create a post:

curl -X POST https://example.com/rest/V1/magecko-blog/posts \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "post": {
      "title": "Brake Pad Wear: What to Check Before Every Ride",
      "slug": "brake-pad-wear-checklist",
      "status": "published",
      "topic": "Brakes",
      "author": "Magecko",
      "publish_date": "2026-07-06 13:00:00",
      "modified_date": "2026-07-06 13:00:00",
      "meta_title": "Brake Pad Wear Checklist",
      "meta_description": "A practical motorcycle brake pad inspection guide.",
      "body_html": "<h2>Brake pad inspection</h2><p>Check pad material before long rides.</p>"
    }
  }'

Save a store-view translation:

curl -X PUT https://example.com/rest/V1/magecko-blog/posts/123/store/2 \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "post": {
      "title": "Piduriklotside kontroll",
      "slug": "piduriklotside-kontroll",
      "topic": "Pidurid",
      "author": "Magecko",
      "meta_title": "Piduriklotside kontroll",
      "meta_description": "Praktiline juhend mootorratta piduriklotside kontrollimiseks.",
      "body_html": "<p>Kontrolli klotsimaterjali enne pikemaid sõite.</p>"
    }
  }'

Upload media:

curl -X POST https://example.com/rest/V1/magecko-blog/media \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "image": {
      "file_name": "brake-pads.png",
      "content_base64": "BASE64_CONTENT_HERE",
      "mime_type": "image/png"
    }
  }'

The media endpoint returns:

{
  "path": "magecko/blog/brake-pads.png",
  "url": "https://example.com/media/magecko/blog/brake-pads.png"
}

Use path as featured_image. Inline article images can be inserted in Admin through the WYSIWYG media browser, or through REST by sending image markup in body_html.

Production Rollout Checklist

  • Install on staging first
  • Confirm Magento and PHP version compatibility
  • Create, edit, delete posts in Admin
  • Confirm draft posts are hidden from the configured blog route and direct post URLs
  • Verify admin and storefront pagination
  • Run php vendor/contentgecko/magecko/Test/Integration/run-smoke.php
  • Create, update, delete posts through REST API
  • Create and verify store-view translations through REST API
  • Upload featured and inline images
  • Verify the configured landing and post URLs through the client theme
  • Verify canonical and hreflang tags on blog post pages
  • Verify full-page cache, Varnish/Fastly/CDN purge behavior
  • Back up production database and media before installation

Notes

  • Blog content is stored in magecko_blog_post.
  • Store-view translations are stored in magecko_blog_post_store.
  • Featured images uploaded through Magecko are stored in pub/media/magecko/blog.
  • Inline images inserted through the WYSIWYG media browser use Magento's standard CMS media storage.
  • The module does not add public anonymous API routes. Use Magento admin/integration authentication.