No description
Find a file
Ruben 36591e7438 Add per-form Listmonk list UUIDs to newsletter plugin
Add support for specifying Listmonk list UUIDs per form instance
Update petition form to use metadata-defined UUIDs
Add success confirmation message to newsletter forms
Update documentation with new functionality
2026-02-07 15:34:43 +01:00
content Add per-form Listmonk list UUIDs to newsletter plugin 2026-02-07 15:34:43 +01:00
custom Add per-form Listmonk list UUIDs to newsletter plugin 2026-02-07 15:34:43 +01:00
docs Add per-form Listmonk list UUIDs to newsletter plugin 2026-02-07 15:34:43 +01:00
.gitignore cPanel PHP INI additions 2026-01-20 21:20:02 +01:00
AGENT.md Update AGENT.md with expanded documentation structure 2026-02-06 19:15:21 +01:00
apache.conf Initial commit 2025-10-02 17:01:55 +02:00
compose.yaml Update compose to set correct permissions for data directory 2026-02-01 20:09:58 +01:00
Containerfile Rename Dockerfile to Containerfile 2026-01-14 23:15:34 +01:00
README.md Update README with content repository structure and documentation 2025-11-01 20:18:10 +01:00

Stopplidelsen.no - Content Repository

This repository contains the content and custom styling for stopplidelsen.no, a Norwegian organization focused on medical cannabis awareness and information.

Project Structure

stopplidelsen-innhold/
├── app/           # Core framework (router, templates, vendor libraries)
├── content/       # All public content (document root)
│   ├── artikler/  # Articles
│   ├── brosjyrer/ # Brochures
│   ├── nyheter/   # News
│   ├── faq/       # Frequently asked questions
│   └── kontakt/   # Contact information
└── custom/        # Site-specific customizations
    ├── templates/ # Custom template overrides
    ├── styles/    # Custom CSS
    ├── languages/ # Translation files (no.ini, en.ini)
    ├── fonts/     # Web fonts
    └── assets/    # Images and other assets

Technology Stack

  • Backend: PHP 8.3+ (Apache module)
  • Content Format: Markdown (via Parsedown library)
  • Frontend: Modern HTML5/CSS3
  • Infrastructure: podman (Apache container)
  • Languages: Norwegian (default) and English

Architecture Overview

/app/ - Core Framework

A minimal, file-based CMS framework providing:

  • Request routing (router.php)
  • Static asset serving (static.php)
  • Default templates and configuration
  • Markdown parser (Parsedown vendor library)

See app/README.md for framework documentation.

/content/ - Public Content

The document root containing all public-facing content. Each section is organized hierarchically with:

  • metadata.ini - Configuration and metadata
  • article.md or page.md - Content in Markdown
  • Images, PDFs, and other media files

/custom/ - Site Customizations

Site-specific overrides including:

  • Templates: Custom PHP templates that override defaults from /app/default/
  • Styles: Custom CSS styling
  • Translations: Language files for Norwegian and English
  • Fonts & Assets: Web fonts and images

Local Development

# Start the development server
podman compose up

# Access the site at http://localhost:4040

Manual Setup

Requirements:

  • PHP 8.3+
  • Apache with mod_rewrite enabled
  • Configure document root to content/

Server Deployment Structure

The production server uses symlinks to separate the app code from content, allowing two independent git repositories:

/home/rubensol/dev.stopplidelsen.no/
├── folderweb/           # App repository
│   ├── app/
└── innhold/             # Content repository
    ├── content/         # Document root
    ├── custom/
    └── app/             # Symlink → ../folderweb/app/

In /innhold/ directory:

cd /home/rubensol/dev.stopplidelsen.no/innhold/
ln -s ../folderweb/app app

In /folderweb/ directory:

cd /home/rubensol/dev.stopplidelsen.no/folderweb/
ln -s ../innhold/custom custom

Web Server Configuration

  • Document Root: content/
  • The .htaccess file in content/ routes all requests through index.php
  • Static /app/ requests are handled by app/static.php

Content Management

Creating New Content

  1. Create a new directory in the appropriate section (e.g., content/artikler/my-article/)
  2. Add a metadata.ini file with title, slug, and other metadata
  3. Create content in article.md (or article.no.md and article.en.md for translations)
  4. Optionally add cover.jpg for thumbnail images

Multilingual Content

The site supports Norwegian and English:

  • URLs use language prefixes: /no/artikler/... or /en/articles/...
  • Content files can be language-specific: article.no.md, article.en.md
  • Slugs are translated via metadata.ini configuration
  • Translations stored in custom/languages/no.ini and en.ini

Key Features

  • File-based CMS: No database required
  • Markdown support: Write content in Markdown with automatic HTML conversion
  • Multilingual: Norwegian and English with URL-based language switching
  • SEO-friendly URLs: Clean, translatable slugs
  • Multiple template layouts: List, grid, card grid, FAQ views
  • Media support: Cover images, PDFs, downloadable resources
  • Performance tracking: Page generation timing displayed