Skip to content

Blog Management Integration with Solidus Static Content#2

Open
JustShah wants to merge 10 commits intofix-gem-to-support-latest-solidusfrom
add-blog-module
Open

Blog Management Integration with Solidus Static Content#2
JustShah wants to merge 10 commits intofix-gem-to-support-latest-solidusfrom
add-blog-module

Conversation

@JustShah
Copy link
Copy Markdown

@JustShah JustShah commented Mar 20, 2025

Summary:
This PR integrates blog management functionality into the Solidus Static Content engine. It introduces blog-related features including model definitions, API controllers, and views for managing blogs within the Solidus admin interface. Additionally, it incorporates taxon autocomplete functionality to enhance the user experience during blog creation and editing.

Changes Introduced:

  1. Blog Management in Solidus Static Content:

    • Updated the Solidus Static Content engine to include blog management. This includes the addition of relevant menu items and logic for blog activation within the admin interface.
  2. Blog API:

    • Introduced a new API controller (BlogsController) to manage CRUD operations for blogs, allowing external systems to interact with blog data.
    • Added logic to the API to include blog images (author_image and article_images) and taxons in the response for better integration with external clients.
  3. Blog Backend:

    • Implemented a backend controller to manage blogs, including actions for creating, updating, and deleting blogs and their associated images. This functionality is integrated into the Solidus admin interface.
    • Added routes for handling CRUD operations and image deletion for blog management.
  4. Database Schema:

    • Created migrations to set up the necessary tables for blog management, including spree_blogs, spree_blogs_stores, and spree_blogs_taxons. These migrations establish the database schema needed to store blog data, associate blogs with stores, and manage the relationship between blogs and taxons.
  5. Models and Decorators:

    • Added the Spree::Blog model, along with associations and validations, to handle blog data management.
    • Created the Spree::Tag model to manage the relationship between blogs and taxons. This allows for better categorization of blogs through taxons.
    • Decorated the Spree::Taxon model to include tags, ensuring taxons can be associated with blogs.
  6. Localization:

    • Updated the locales to include blog-related translations, ensuring proper internationalization for blog management.
  7. Admin Views:

    • Created views for managing blogs within the admin interface, including forms for creating and editing blogs and a list view for displaying existing blogs. This provides the necessary UI components for blog management.
    • Added JavaScript for taxon autocomplete functionality. This improves the user experience by providing a more convenient way to select taxons when creating or editing blogs.

This PR aims to seamlessly integrate blog management functionality into the existing Solidus Static Content engine, enabling a more comprehensive content management system for blogs within Solidus.

Images
image
image
image
image

JustShah added 10 commits March 20, 2025 17:47
Create migrations to set up the database schema for blogs,
including the `spree_blogs`, `spree_blogs_stores`, and `spree_blogs_taxons`
tables. This establishes the necessary database structure for managing blogs.
Create `Spree::Blog` model with necessary associations and validations.
This establishes the core structure for managing blogs within the application.

Create `Spree::Tag` model to manage the relationship between blogs and taxons.
This allows blogs to be associated with multiple taxons for better categorization.

Decorated the `Spree::Taxon` model to include tags. This modification ensures that taxons can be associated with blogs through tags.
Add backend controller for managing blogs,
including actions for creating, updating, and
deleting blogs and their associated images.
This provides the necessary logic for blog management within the admin interface.
Add controller for managing blogs,
including actions for CRUD operations.
This enables external systems to interact with the blog data through the API.
Add routes for blogs, including CRUD operations and image deletion.
This enables the necessary endpoints for blog management
within the admin interface and API.
Add views for blogs in the admin interface,
including forms for creating and editing blogs and a list view
for displaying existing blogs. This provides the necessary UI components for blog management.
Add JavaScript file for taxon autocomplete for blogs.
This enhances the user experience by providing a convenient way to select taxons when creating or editing blogs.
Updated the Solidus Static Content engine to include blog management,
including menu items and activation logic. This integrates blog management into
the existing Solidus Static Content functionality. It also adds javascript using generator.
@fthobe
Copy link
Copy Markdown

fthobe commented Mar 21, 2025

Hey, are taxons complete and can we demo this?

@JustShah JustShah linked an issue Apr 3, 2025 that may be closed by this pull request
@fthobe
Copy link
Copy Markdown

fthobe commented Apr 11, 2025

@JustShah Screenshots for visual change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blog Functionality

2 participants