From d9dd648c51f3bb1ce15984482b76abfb585ab241 Mon Sep 17 00:00:00 2001 From: Celia Collins Date: Fri, 20 Sep 2019 16:14:17 +0100 Subject: [PATCH 01/10] Add product story upload to Netlify CMS frontend --- config.rb | 10 ++++++++++ source/admin/index.html | 1 + 2 files changed, 11 insertions(+) diff --git a/config.rb b/config.rb index ceb25e690..e7827fe4d 100644 --- a/config.rb +++ b/config.rb @@ -44,6 +44,16 @@ blog.page_link = 'page-{num}' end +# product stories +activate :blog do |blog| + blog.name = 'product-stories' + blog.sources = '{year}-{month}-{day}-{title}.html' + blog.layout = 'product_story' + blog.prefix = 'product-stories' + blog.permalink = "{title}.html" + blog.new_article_template = 'templates/product_story.md' +end + # news activate :blog do |blog| blog.name = 'news' diff --git a/source/admin/index.html b/source/admin/index.html index 162f557db..6714cf1df 100644 --- a/source/admin/index.html +++ b/source/admin/index.html @@ -53,6 +53,7 @@ }); CMS.registerPreviewTemplate('blog_posts', BlogPostPreview); + CMS.registerPreviewTemplate('product_stories', BlogPostPreview); CMS.registerPreviewTemplate('news_articles', BlogPostPreview); CMS.registerPreviewTemplate('weekly_roundup', BlogPostPreview); From 620e7c4eacb5e5f3181484dc1fd8c0abd6ccf2b7 Mon Sep 17 00:00:00 2001 From: Celia Collins Date: Fri, 20 Sep 2019 16:17:28 +0100 Subject: [PATCH 02/10] Add content blocks for product story to Netlify CMS frontend --- source/admin/config.yml | 195 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) diff --git a/source/admin/config.yml b/source/admin/config.yml index c74ef30be..b7669daca 100644 --- a/source/admin/config.yml +++ b/source/admin/config.yml @@ -59,6 +59,201 @@ collections: name: 'body' widget: 'markdown' + - name: 'product_stories' + label: 'Product stories' + folder: '/source/product-stories' + label_singular: 'product story' + create: true + slug: '{{year}}-{{month}}-{{day}}-{{slug}}' + extension: 'html.markdown' # Middleman v4 requires .html.markdown + format: 'frontmatter' + fields: + - label: 'Page title - e.g Product Story - Client' + name: 'title' + widget: 'string' + + - label: 'Description (shown on the product story listing page)' + name: 'description' + widget: 'string' + + - label: 'Client logo shown on the product story listing page - 454 x 180 px' + name: image + widget: "image" + + - label: 'Date' + name: 'date' + widget: 'datetime' + + - label: 'Published?' + name: published + widget: boolean + default: true + + - label: "Header" + name: "header" + widget: "object" + fields: + - {label: "Client", name: client, widget: string} + - {label: "Introduction", name: introduction, widget: string} + - {label: "Header image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: 'Introduction (heading and bullet point summary)' + name: introduction + widget: object + fields: + - {label: "Title", name: title, widget: string} + - label: "Bullet points" + name: content + widget: list + fields: + - {label: "Bullet point", widget: string} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "In numbers" + name: "highlight_1" + widget: object + fields: + - {label: "Title", name: title, widget: string} + - {label: "Project (used to create coloured bands)", name: project, widget: string} + - label: "Statistics" + name: statistics + widget: list + fields: + - {label: "number", name: number, widget: string} + - {label: "text", name: text, widget: string} + + - label: "Paragraph and photo" + name: "paragraph_1" + widget: object + fields: + - {label: "Header", name: title, widget: string} + - {label: "Content", name: content, widget: markdown} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "Quote" + name: "quote_1" + widget: object + fields: + - {label: "Quote", name: quote, widget: string} + - {label: "Source", name: source, widget: string} + + - label: "Paragraph and photo" + name: "paragraph_2" + widget: object + fields: + - {label: "Header", name: title, widget: string} + - {label: "Content", name: content, widget: markdown} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "In numbers (not required)" + name: "highlight_2" + widget: object + required: false + fields: + - {label: "Title", name: title, widget: string} + - {label: "Project (used to create coloured band)", name: project, widget: string} + - label: "Statistics" + name: statistics + widget: list + fields: + - {label: "Number", name: number, widget: string} + - {label: "Text", name: text, widget: string} + + - label: "Paragraph and photo" + name: "paragraph_3" + widget: object + fields: + - {label: "Header", name: title, widget: string} + - {label: "Content", name: content, widget: markdown} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "Quote" + name: "quote_2" + widget: object + fields: + - {label: "Quote", name: quote, widget: string} + - {label: "Source", name: source, widget: string} + + - label: "Paragraph and photo (not required)" + name: "paragraph_4" + widget: object + required: false + fields: + - {label: "header", name: title, widget: string} + - {label: "content", name: content, widget: markdown} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "Quote (not required)" + name: "quote_3" + widget: object + required: false + fields: + - {label: "quote", name: quote, widget: string} + - {label: "source", name: source, widget: string} + + - label: "Video (not required)" + name: "video" + widget: object + required: false + fields: + - {label: "Youtube ID", name: youtube_id, widget: string} + - {label: "Image", name: image, widget: image} + - {label: "Image description", name: image_description, widget: string} + + - label: "Team" + name: team + widget: object + fields: + - label: "People" + name: people + widget: list + fields: + - {label: "Full name", name: full_name, widget: string} + - {label: "Image", name: image, widget: image} + - {label: "Link to people page", name: link, widget: string, required: false} + + - label: "Site of the client (not required)" + name: "site" + widget: object + required: false + fields: + - {label: "Link", name: link, widget: string} + - {label: "Text", name: text, widget: string} + + - label: "Links related to this product story (not required)" + name: links + widget: list + required: false + fields: + - {label: "Title", name: title, widget: string} + - {label: "Source", name: source, widget: string} + - {label: "Type", name: type, widget: string} + - {label: "Link", name: link, widget: string} + + - label: "Related Articles (not required)" + name: "related" + widget: object + required: false + fields: + - {label: "Title (fill in with 'related')", name: title, widget: string} + - label: "Articles" + name: articles + widget: list + fields: + - {label: "Title", name: title, widget: string} + - {label: "Type", name: type, widget: string} + - {label: "Link", name: link, widget: string} + + - label: 'Body (just fill in with single character)' + name: 'body' + widget: 'markdown' + - name: 'news_articles' label: 'News articles' folder: '/source/news' From e6c6e74b565395176d24de19183b0da7d7b4d06b Mon Sep 17 00:00:00 2001 From: Celia Collins Date: Fri, 20 Sep 2019 16:22:08 +0100 Subject: [PATCH 03/10] Update product story index page to use cms produced articles --- source/product-stories.html.erb | 111 ++------------------------------ 1 file changed, 5 insertions(+), 106 deletions(-) diff --git a/source/product-stories.html.erb b/source/product-stories.html.erb index 348931e0c..770baa177 100644 --- a/source/product-stories.html.erb +++ b/source/product-stories.html.erb @@ -5,107 +5,6 @@ header: title: "Product stories" subtitle: "Since 2005, Unboxed has been working across both the public and private sectors to deliver end-to-end digital products and services through agile, user-centered approaches." - -product_stories: - - client: "Petitions" - description: "Public sector collaboration with GDS to relaunch Petitions platform for UK citizens, meeting new user needs and public demand in just 10 weeks" - link: "/product-stories/petitions/" - image: "/assets/images/product-stories/petitions.png" - - - client: "Guy's and St Thomas'" - description: "Introducing a patient-led innovation programme into the NHS" - link: "/product-stories/guys-and-st-thomas/" - image: "/assets/images/product-stories/guys-and-st-thomas.jpg" - - - client: "SH:24" - description: "Transformation of NHS sexual health clinics to a digital service in 8 weeks" - link: "/product-stories/sh24/" - image: "/assets/images/product-stories/sh24.jpg" - - - client: "Public Health England" - description: "Developing the UK National Screening Committee’s new online presence with Public Health England: discovery phase" - link: "/product-stories/public-health-england-nsc-discovery/" - image: "/assets/images/product-stories/public-health-england.jpg" - - - client: "Southwark CCG" - description: "Improving general practice access with Southwark CCG: Design sprint" - link: "/product-stories/southwark-ccg/" - image: "/assets/images/product-stories/southwark-ccg.jpg" - - - client: "char.gy" - description: "Providing residents with an on-street electric vehicle lamppost charging solution with char.gy" - link: "/product-stories/chargy/" - image: "/assets/images/product-stories/chargy.jpg" - - - client: "States of Jersey" - description: "Launching Jersey Petitions through an open source approach with States of Jersey" - link: "/product-stories/jersey-petitions/" - image: "/assets/images/product-stories/jersey-petitions.png" - - - client: "Plymouth University" - description: "Unboxed leads Agile rebuild of Plymouth University website" - link: "/product-stories/plymouth-university/" - image: "/assets/images/product-stories/plymouth-university.jpg" - - - client: "Newham Council" - description: "Exploring special education needs and disability services with Newham Council" - link: "/product-stories/newham-council-local-offer/" - image: "/assets/images/product-stories/newham-council-local-offer.jpg" - - - client: "Newham Council" - description: "Improving residential access and support to homelessness services - the Discovery and Alpha phases" - link: "/product-stories/newham-council/" - image: "/assets/images/product-stories/newham-council.jpg" - - - client: "Channel 5" - description: "Redevelopment of Channel5.com attracts more users, driving revenue" - link: "/product-stories/channel-5/" - image: "/assets/images/product-stories/channel-5.jpg" - - - client: "Buckinghamshire County Council" - description: "12-week Beta phase for two services with annual cost-saving of £350,000" - link: "/product-stories/bucks-cc-beta" - image: "/assets/images/product-stories/bucks-cc-beta.jpg" - - - client: "Pearson" - description: "Unlocking a new digital learning revenue stream with Pearson" - link: "/product-stories/pearson" - image: "/assets/images/product-stories/pearson.jpg" - - - client: "Reed Learning" - description: "Leading digital transformation in professional learning and development" - link: "/product-stories/reed-learning" - image: "/assets/images/product-stories/reed-learning.jpg" - - - client: "Springer Nature" - description: "Exploring the impact of online publishing with Bookmetrix" - link: "/product-stories/bookmetrix" - image: "/assets/images/product-stories/bookmetrix.jpg" - - - client: "Buckinghamshire County Council" - description: "6-week Discovery and 8-week Alpha phases for two key public services" - link: "/product-stories/bucks-cc" - image: "/assets/images/product-stories/bucks-cc.jpg" - - - client: "Contiki Holidays" - description: "Powerful offshore partnership creates 47% increase in bookings for Contiki Holidays" - link: "/product-stories/contiki-holidays/" - image: "/assets/images/product-stories/contiki.jpg" - - - client: "Naturejobs" - description: "Recruitment site revitalisation for major scientific publishing group" - link: "/product-stories/naturejobs/" - image: "/assets/images/product-stories/naturejobs-macmillan.jpg" - - - client: "V&A" - description: "Hosting and infrastructure delivery of new digital platform for world-leading V&A" - link: "/product-stories/v-and-a-museum" - image: "/assets/images/product-stories/v-and-a-museum.jpg" - - - client : "Petition Map" - description: "Visualising UK petition signatures and open source data" - link: "/product-stories/petition-map" - image: "/assets/images/product-stories/petition-map.jpg" ---