Problem/Motivation

The Image Link Formatter module currently provides documentation primarily through its README file. To improve documentation accessibility, discoverability, and maintainability, we should implement a GitLab Pages documentation site using the standardized MkDocs approach supported by Drupal's GitLab templates.

A GitLab Pages site will provide:

  • Better navigation and search functionality
  • Version-controlled documentation-as-code
  • Automatic publishing on commits to the default branch
  • Preview capabilities in merge requests
  • A professional, maintainable documentation structure

Steps to reproduce

Proposed resolution

Implement a GitLab Pages documentation site for the Image Link Formatter module following the standard Drupal GitLab templates approach documented at: https://project.pages.drupalcode.org/gitlab_templates/jobs/pages/

Implementation steps:

  1. Create MkDocs configuration file (mkdocs.yml in project root)
    • Configure site metadata (name, URL, repository links)
    • Set up Material for MkDocs theme
    • Configure navigation structure
    • Use the project's existing logo.png file
    • Enable search and privacy plugins
  2. Create documentation structure (/docs folder)
    • Create docs/index.md as the homepage
    • Migrate and enhance content from existing README
    • Structure documentation following best practices:
      • Installation and setup
      • Configuration guide
      • Usage examples
      • Field formatter configuration options
      • Troubleshooting
      • Contributing guidelines
      • Developer documentation (if applicable)
  3. Configure GitLab Pages deployment
    • Verify that the GitLab templates are properly configured (should work automatically)
    • Set unique domain setting as needed in Deploy > Pages > Domains & settings
    • Test that the pages job runs on commits to the default branch
  4. Validate deployment

Example implementation structure:

image_link_formatter/
├── mkdocs.yml
├── logo.png (existing)
└── docs/
    ├── index.md (homepage)
    ├── installation.md
    ├── configuration.md
    ├── usage.md
    ├── troubleshooting.md
    └── developer/
        └── architecture.md (optional)

Examples and references

Similar implementations:

Official documentation:

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dydave created an issue. See original summary.

  • dydave committed 646fb9c7 on 2.2.x
    Issue #3612109 by dydave: Added GitLab Pages documentation site using...
dydave’s picture

Status: Active » Fixed

Quick follow-up on this issue:

This ticket was initially prompted by the need of finding an appropriate place in the module to store AI "spec-driven" prompts and PLAN/SPECS.md types of files.

I thought documentation would be a "safer" space to work with AI and give more trust to its generated content.
Since I saw there was a new documentation job supported in the gitlab CI builds for documentation, I thought it would be a great opportunity to try producing everything with AI.

So I started by adding the mkdocs.yml config file with the specs files in the docs/specs folder and then thought of expanding with different sections: User guide, developer, etc...
The README.md file served as a great starting point.

I actually spent most of the time refining the documentation:
Each time I would preview the md files locally and think of new things to add or modify.
It was a very iterative process which I tried to keep documented in the file: GITLAB_PAGES_SPEC.md.

At a very small scale, I tried to apply a "spec-driven" approach and refine as much as possible a specifications document to specify certain tasks or rules for the AI agent.

A lot of issues were thankfully caught by the quality gates: breaking build pipelines on Gitlab CI, which is a really great thing.👍
Among some of the problems encountered:

  • CSpell introduced keywords.
  • Tweaking the MKDocs Material theme.
  • Gitlab CI configuration.

 
I deployed the documentation several times by triggering builds manually on the issue fork repos which allowed me to fully test the rendered output of all the pages.

Since all the jobs and tests were still passing all 🟢, I went ahead and merged the changes above at #3.

The documentation site is now live at: 🥳
https://project.pages.drupalcode.org/image_link_formatter/

The last build with all jobs came back all green 🟢:
https://git.drupalcode.org/project/image_link_formatter/-/pipelines/899870

I already updated the project page to add a section to point to the new documentation:
https://www.drupal.org/project/image_link_formatter#documentation

I'm sure we will think of other things to add or modify in the documentation, but this is already a great initial base for such a small module on which we should be able to keep building in the future. 👌

Since I don't see any more actions to be carried in this issue, we could most likely consider all the work initially described and expected should have been completed at this point.
Therefore, marking issue as Fixed for now.

Feel free to let us know if you have any questions or concerns on any aspects of the documentation or the module in general, we would surely be glad to hear your feedback.
Thanks in advance!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.