From 0d87c3b8064522149e16df16a3eef779403be587 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 15 May 2018 02:18:37 +0100 Subject: [PATCH] Move nav links into settings --- app/config/sculpin_site.yml | 3 +++ data/navigation.yml | 24 ++++++++++++++++++++++++ source/_includes/nav.html.twig | 11 +---------- 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 data/navigation.yml diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index 1d2fb2a4..df738885 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -241,3 +241,6 @@ events: name: 'unified.diff' location: Cardiff, UK website: http://unifieddiff.co.uk + +imports: + - '../../data/navigation.yml' diff --git a/data/navigation.yml b/data/navigation.yml new file mode 100644 index 00000000..ceea404b --- /dev/null +++ b/data/navigation.yml @@ -0,0 +1,24 @@ +navigation: + - title: About + href: '/' + pattern: '^/.$' + + - title: Experience + href: '/experience' + pattern: '^/experience/?$' + + - title: Talks + href: '/talks' + pattern: '^/talks/?' + + - title: 'Open Source' + href: '/opensource' + pattern: '^/opensource/?$' + + - title: Blog + href: '/blog' + pattern: '^/blog/?' + + - title: Contact + href: '/contact' + pattern: '^/contact/?' diff --git a/source/_includes/nav.html.twig b/source/_includes/nav.html.twig index 333b6bd8..d917d3b2 100644 --- a/source/_includes/nav.html.twig +++ b/source/_includes/nav.html.twig @@ -15,17 +15,8 @@ - {% set links = [ - { title: 'About', href: '/', pattern: '^/.$' }, - { title: 'Experience', href: '/experience', pattern: '^/experience/?$' }, - { title: 'Talks', href: '/talks', pattern: '^/talks/?' }, - { title: 'Open Source', href: '/opensource', pattern: '^/opensource/?$' }, - { title: 'Blog', href: '/blog', pattern: '^/blog/?' }, - { title: 'Contact', href: '/contact', pattern: '^/contact/?' } - ] %} -