alphagov / tech-docs-gem

Gem to distribute the tech docs project
https://tdt-documentation.london.cloudapps.digital/
MIT License
15 stars 38 forks source link

`report_issue_url` cannot be configured in `config/tech-docs.yaml` #283

Open lfdebrux opened 2 years ago

lfdebrux commented 2 years ago

Currently the tech docs documentation tells users that they can configure the url for the 'report problem' link by adding some configuration to config/tech-docs.yaml [1]. Unfortunately, a bug in the implementation of this feature means that the configuration actually has to be added to config.rb:

https://github.com/alphagov/tech-docs-gem/blob/66f71178f2956f9acbc70ef182a786f12768ff76/lib/govuk_tech_docs/contribution_banner.rb#L22

Line 22 should actually read source_urls from the tech_docs hash.

What should change

We should change it so that the configuration is read from config/tech-docs.yaml, while retaining a fallback ability to configure from config.rb as before, to avoid a breaking change.

User need

As a user I need to be able to use example code from the documentation.