Skip to content

Add guide for adding a new service#89

Merged
edwardhorsford merged 3 commits intomainfrom
add-guide-adding-new-service
Mar 27, 2025
Merged

Add guide for adding a new service#89
edwardhorsford merged 3 commits intomainfrom
add-guide-adding-new-service

Conversation

@edwardhorsford
Copy link
Copy Markdown
Collaborator

No description provided.

@frankieroberto frankieroberto temporarily deployed to screening-de-add-guide--q8xsol March 26, 2025 17:14 Inactive
Comment thread app/guide/how-to-add-a-new-service.md Outdated
* create a `your-service-name.json` file within `app/posts/` that adds the eleventyNavigation parent name as the name of your service (copy an existing example)
* create a Markdown file in `app/posts/`, for example `app/posts/your-service-name.md`. Copy an existing example and update any references to match your service.
* update `eleventy.config.js` to create a new 'collection' for your service (copy one of the existing examples)
* update `app/_layouts/_product.njk` to list your new service in the sections variable
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* update `app/_layouts/_product.njk` to list your new service in the sections variable
* update `app/_layouts/_product.njk` to list your new service in the `sections` variable

Comment thread app/guide/how-to-add-a-new-service.md Outdated
Copy link
Copy Markdown
Collaborator

@jolumley-nhs jolumley-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - steps are all correct :)

Co-authored-by: Frankie Roberto <frankie.roberto1@nhs.net>
@edwardhorsford edwardhorsford temporarily deployed to screening-de-add-guide--q8xsol March 27, 2025 14:30 Inactive
@edwardhorsford edwardhorsford merged commit 378a0b9 into main Mar 27, 2025
1 check passed
@edwardhorsford edwardhorsford deleted the add-guide-adding-new-service branch March 27, 2025 14:31
Copy link
Copy Markdown
Contributor

@LeeGathercole LeeGathercole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding how the folders are structured under the posts and also how you reference images from a post to the image. I'd be a bit more explicit in the config, because

eleventyConfig.addCollection("your-service-name", (collection) => {
return collection.getFilteredByGlob(
"app/posts/your-service-name/**/*.md"
);
});

{ title: "Screening", services: [
"Bowel screening",
"Explore team",
"Manage breast screening",
"Manage your screening",
"Your service name"
] },

    Not sure if it's old man eye-sight, but I struggled to find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants