Problem/Motivation
Currently content first works perfectly
Technically, all the content first code is generated in a route controller. Moving the generation logic to a Drupal service allows to be used by other modules , plus adding more funcionality besides Drupal Routes.
The motivation to provide this functionality is being able to provide a token that renders content first markdown, to be used by n8n/AI.
Proposed resolution
Move all logic that generates the HTML and markdown to a service named content_first.build.
This service will return a class named RenderedCOntent that will have methods to get HTML, Xpath, and markdown.
Issue fork content_first-3536815
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
Comment #3
omarlopesinoI have finished the refactor. I have checked it with a site using content first and the generated content appears equal, without regressions. I have checked: HTML, markdown, copy and download. This is ready to review.
Comment #5
omarlopesinoMerged! It will be released at beta 6