7.2 KiB
Tasks for Feature: Add Blog "Medkulturni kotiček"
Feature Branch: 001-add-blog
Date: 2025-11-17
Spec: /Users/markpoljansek/prosberry_produkcija/specs/001-add-blog/spec.md
Plan: /Users/markpoljansek/prosberry_produkcija/specs/001-add-blog/plan.md
Implementation Strategy
The implementation will follow an iterative approach, prioritizing core user stories first to deliver a Minimum Viable Product (MVP). Each user story will be implemented and tested independently where possible.
MVP Scope: User Story 1 (View Blog Main Page), User Story 2 (Read an Individual Article), and User Story 3 (Website Owner Adds New Article) form the core MVP, enabling content consumption and management.
Phase 1: Setup
- T001 Create base blog directory structure:
mkdir -p blog/clanki/ assets/images/blog/ - T002 Create empty
blog/template.htmlfile - T003 Create empty
posodobi_blog.shscript file - T004 Create empty
blog/index.htmlfile (will be auto-generated later)
Phase 2: Foundational (Core Script & Template)
- T005 Implement
jqdependency check inposodobi_blog.sh - T006 Implement basic script structure in
posodobi_blog.shto find.htmlfiles inblog/clanki/ - T007 Implement article sorting by filename (date) in
posodobi_blog.sh - T008 Create initial
blog/template.htmlcontent with placeholders:__NAJNOVEJSI_CLANEK__,__CAKAJOCI_CLANKI__,__ARHIV_SEZNAM__ - T009 Implement metadata extraction (JSON from HTML comment) in
posodobi_blog.sh - T010 Implement malformed JSON handling (skip with warning) in
posodobi_blog.sh - T011 Implement invalid filename handling (ignore with warning) in
posodobi_blog.sh
Phase 3: User Story 3 (P1) - Website Owner Adds New Article
Goal: Enable the website owner to easily add new articles to the blog. Independent Test: A new article can be added by creating a file with metadata and running the script, resulting in the main blog page being updated correctly.
- T012 [US3] Implement HTML generation for featured article in
posodobi_blog.sh - T013 [US3] Implement HTML generation for recent articles (3 cards) in
posodobi_blog.sh - T014 [US3] Implement HTML generation for archive list in
posodobi_blog.sh - T015 [US3] Implement placeholder generation for < 4 articles in
posodobi_blog.sh - T016 [US3] Implement placeholder replacement in
blog/template.htmlwith generated content inposodobi_blog.sh - T017 [US3] Implement writing final HTML to
blog/index.htmlinposodobi_blog.sh - T018 [US3] Create a sample article file
blog/clanki/2025-11-17-sample-article.htmlwith valid JSON metadata and content.
Phase 4: User Story 1 (P1) - View Blog Main Page
Goal: Display the main blog page with the latest articles prominently.
Independent Test: The /blog/index.html page can be accessed directly and displays the articles according to the specified layout (featured, recent, archive).
- T019 [US1] Run
posodobi_blog.shto generateblog/index.htmlwith sample data - T020 [US1] Verify
blog/index.htmldisplays featured article correctly - T021 [US1] Verify
blog/index.htmldisplays recent articles correctly - T022 [US1] Verify
blog/index.htmldisplays archive list correctly - T023 [US1] Verify placeholder blocks are displayed if fewer than 4 articles are present (requires additional sample data or modification of T018)
Phase 5: User Story 2 (P1) - Read an Individual Article
Goal: Allow visitors to read full article content on dedicated pages.
Independent Test: An individual article page (e.g., /blog/clanki/YYYY-MM-DD-article-title.html) can be accessed directly and displays the full article content with consistent styling.
- T024 [US2] Ensure links from
blog/index.htmlto individual articles are correct - T025 [US2] Verify individual article pages load correctly
- T026 [US2] Verify individual article pages display full content
Phase 6: User Story 4 (P2) - Access Blog from Navigation
Goal: Integrate the blog into the main website navigation. Independent Test: The main navigation menu includes a "Blog" link that correctly leads to the blog's main page.
- T027 [US4] Add
<a href="/blog/">Blog</a>link toheader-template.htmlnext to "Cene in reference" - T028 [US4] Run
update-menus.shto apply navigation changes across the site - T029 [US4] Verify "Blog" link is present in main navigation on all relevant pages
- T030 [US4] Verify "Blog" link navigates to
/blog/index.html
Final Phase: Polish & Cross-Cutting Concerns
- T031 [P] Add new CSS styles for blog elements (
.blog-layout,.blog-main-content,.blog-sidebar,.featured-article,.recent-card,.archive-list) tocss/style.css - T032 [P] Ensure blog CSS styles are fully responsive for mobile devices
- T033 [P] Verify individual article page styling matches overall website design (warm colors, non-white background)
- T034 [P] Implement unit tests for
posodobi_blog.shusing Bats-core - T035 [P] Implement HTML/CSS/JS Linting/Validation for generated pages
- T036 [P] Implement Link Checking for generated blog pages
- T037 Update
README.mdwith instructions for adding new blog posts and runningposodobi_blog.sh - T038 Review and optimize generated HTML for SEO and accessibility
Dependencies
- Phase 2 (Foundational) must be completed before any User Story phases.
- User Story 3 (Website Owner Adds New Article) is foundational for User Story 1 (View Blog Main Page) as it generates the content.
- User Story 1 (View Blog Main Page) is foundational for User Story 2 (Read an Individual Article) as it provides the links.
Parallel Execution Opportunities
- Phase 1: Setup: All tasks are sequential.
- Phase 2: Foundational: Tasks T005-T011 are largely sequential due to script development.
- Phase 3: User Story 3: Tasks T012-T017 are sequential as they build the script logic. T018 can be done in parallel once the script logic is stable.
- Phase 4: User Story 1: Tasks T019-T023 are sequential as they involve testing the generated output.
- Phase 5: User Story 2: Tasks T024-T026 are sequential.
- Phase 6: User Story 4: Tasks T027-T030 are sequential.
- Final Phase: Tasks T031-T036 can be executed in parallel. T037 and T038 are final documentation/review tasks.
Independent Test Criteria for Each Story
- User Story 1 (View Blog Main Page): Navigate to
/blog/index.htmland visually confirm the layout (featured, recent, archive) and content display as specified. - User Story 2 (Read an Individual Article): Click on a link to an individual article from the main blog page or navigate directly to an article URL. Verify full content display and consistent styling.
- User Story 3 (Website Owner Adds New Article): Create a new article HTML file with valid metadata, run
posodobi_blog.sh, and verify thatblog/index.htmlis updated correctly to include the new article. - User Story 4 (Access Blog from Navigation): Navigate to various pages on the website, confirm the "Blog" link is present in the main navigation, and verify it correctly leads to
/blog/index.html.