Move all files to tome/

This commit is contained in:
Oliver Davies 2025-10-01 00:05:52 +01:00
parent 5675bcfc36
commit 674daab35b
2874 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
Migrate to Tome
Date: 2025-05-03
Status: accepted
Context:
The previous version of the website is built with Sculpin, a static site generator written in PHP.
Whilst it's a great project, I've felt that I've started to outgrow it in some ways and have been thinking about migrating to something else.
I've been aware of Tome - https://www.drupal.org/project/tome - for a while and it seems like a logical choice for someone who likes both Drupal and static site generators.
Decision:
Migrate pages from Sculpin to Drupal/Tome.
This can be done incrementally and different pages can be served from Sculpin or Tome based on the URL being visited.
Consequences:
I can continue to work with familiar tools - e.g. PHP, Drupal, PHPUnit - and don't need to migrate to (or back to) something different like Jekyll, Hugo or Astro.
Tome will allow me to export the content from Drupal to a static website, the same as Sculpin does, so I'll continue to get the same benefits of a static website, such as performance, security and being easy to host and deploy.
For consistency, a new theme would need to be created in Drupal so users aren't confused when being served pages from different sources. A lot of the same markup and CSS should be able to be reused.
As new pages and sections are rebuilt in Drupal/Tome, I can serve these to users by updating the rules in Nginx and incrementally migrate rather than rebuilding and deploying everything at once - making it less risky.

View file

@ -0,0 +1,24 @@
Use Markdown to add and edit content
Date: 2025-05-23
Status: accepted
Context:
Drupal has its own input filters for basic, full and restricted HTML, but doesn't support Markdown out of the box.
There are contrib modules that can add this functionality, which would make it easier to migrate existing content from Sculpin.
Decision:
Install and use the Markdown Easy module - https://www.drupal.org/project/markdown_easy.
I considered using the Markdown module - https://www.drupal.org/project/markdown - but this is more complicated to set up and there's no current Drupal 11 version.
Consequences:
Using the Markdown Easy module will make it easier to create content in Drupal and migrate pages from Sculpin which are written in Markdown.
I can still use the standard Drupal text formats and CKEditor when needed.

View file

@ -0,0 +1,25 @@
Use Drupal Test Traits
Date: 2025-06-10
Status: accepted
Context:
Drupal Test Traits is a module that provides a number of traits to make it easier to write automated tests for an existing website.
Decision:
Adopt Drupal Test Traits for any custom module tests that won't be contributed back to Drupal.org - e.g. the opd_presentations module.
Consequences:
Using Drupal Test Traits will make it simpler to write tests without needing to create test-specific modules that only create configuration like content types and fields.
In some cases, I will need to change the approach for a test.
For example, I can't create a single presentation node in a test and assert there is only one presentation as there will be existing presentations in the database.
Also, because Tome automatically exports content to JSON files, it will export any content created within the tests.
I'll need to reset the files within the `content` directory and run `drush tome:import` to reset the database with the required content.