Add the integromat webhook URL to the Ansible Vault and also to the
generated Drupal settings file that Ansible generates, and the
opdavies_blog module configuration.
References #340
Enable the auto-configuration of service and repository classes,
including support for classes in subdirectories by using
`getRelativePathname()` rather than `getFilename()` and making some
additional changes to the result.
References #347
Within the `PostFactory` class, ensure that when using the `withTags`
method and creating tag terms that an existing term doesn't already
exist for a given name before trying to create it.
With the previous implementation, there would be multiple terms if the
PostFactory was used multiple times with the same tag name.
Given that `PostFactory` now has a dependency on `EntityTypeManger`,
this has been added as a service within `opdavies_blog_test` and needs
to be resolved from the container before trying to use it within a test.
This commit also updates the usages in `PostTest` so that those tests
continue to work and pass.
References #3
Refactor from using `loadByProperties` to using an entity query.
`loadByProperties` doesn't allow for passing multiple values for a
single property such as multiple tags to compare against, and also means
that removing the current node can be done in the query rather than
filtering it out of the Collection.
This might also be a more performant solution if we can do the grouping
and sorting of the results in the query rather than needing to perform
additional steps on the result.
References #3
Add the initial code for specifying a blog post and returning related
posts. This includes adding a repository for related posts, and adding
it as a service within the `opdavies_blog` module.
References #3
So that the padding takes up the full space within the tab, move the
padding to the link element. This requires adding a preprocess function
to the theme file and removing the classes from the local task template.
References #341
Add a NullPostPusher implementation and use it within the tag
re-ordering tests to stop an Exception being thrown because there's no
webhook URL.
References #332
Extract a `PostPusher` service with an IFTTT implementation. That means
if this needs to change to use a different service in the future, the
IFTTT implementation can remain unchanged and a new implementation can
be added with its own form params etc.
This also makes this functionality easier to test as we can add a
`NullPostPusher` implementation for testing.
References #332
Override the theme templates for the `talks` and `blog_posts` views,
adding classes to the header wrapper and some spacing between the header
text and the view results.
Enable the experimental feature to use `@apply` with complex classes
including interactive states. I tried this on the Rebuilding Symfony
demo project and it worked well.
This would mean that I could refactor some of my existing styles on this
project.
References #190
Add a new custom token, `[opdavies_talks:talk_count]`, that replaces the
placeholder text with the talk count value from the `TalkCounter`
service.
References #31
- Update the Hook Event Dispatcher module from `8.x-1.29` to `8.x-2.02`.
- Update custom modules after breaking changes from upgrading.
References #112
- Rename `opdavies_blog` to `blog`.
- Rename `opdavies_blog_test` to `blog_test`.
- Rename `opdavies_talks` to `talks`.
- Rename `opdavies_talks_test` to `talks_test`.
The files within the directories haven't changed, so there is no
breaking change caused by renaming the directories.
Please enter the commit message for your changes. Lines starting
Rather than the custom event sorting plugin being based on the `created`
value, this change adds a new `field_event_date` field to the talk node
type and uses this for the sorting instead.
This commit also adds a new `TalkDateUpdater` service that extracts
either the next event date if there is a future date, or the last past
event date if there is no future date, from `field_events` for each talk
and saves it into the event date field.
For consistency, and to ensure that the results are ordered correctly,
the talk date updater converts the date from a date string (e.g.
`2020-08-24`) into a UNIX timestamp, and the timestamp is saved in the
event date field. This can be changed at a later date if needed.
The talks view has been updated to use the updated sort plugin, and the
existing tests have been updated to use the new field.
References #204
Add the ability to add links to external blog posts within my blog feed.
This is done based on a new `field_external_link` field that allows for
adding the external link URL and the domain name as the title.
The node links are then overridden to use the external link if there is
one, so the node title and 'read more' links are changed to use the
external link.
Currently, automated tweets are not generated for external posts.
Fixes#182
Check if a post has previously been sent to social media, by checking
the value of a `field_sent_to_social_media` field.
This field is hidden on the node add/edit forms, and populated when a
post is sent to social media. Once this happens, it will not be sent to
social media again.
This change also populates the field for all existing posts, so that
they won't be re-sent to social media either.
Improve the accessibility for the nav toggle button by adding a border
around the button when it is focussed on.
I've added a custom Tailwind CSS variant to do this using a custom
`focus-visible` variant in tailwind.config.js, and using the
https://www.npmjs.com/package/focus-visible polyfill.