From dec956e9bee78a84dadc63648dfbb707941019c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kr=C3=B3l?= Date: Wed, 16 Mar 2022 16:20:39 +0100 Subject: [PATCH 1/3] use hugo menu template for website menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Król --- blog/config.toml | 247 ++++++++++++++++++ blog/themes/3mdeb/content/about.md | 18 -- .../themes/3mdeb/layouts/partials/header.html | 76 ++---- 3 files changed, 268 insertions(+), 73 deletions(-) delete mode 100644 blog/themes/3mdeb/content/about.md diff --git a/blog/config.toml b/blog/config.toml index 6dec12c0c..0c14e1596 100644 --- a/blog/config.toml +++ b/blog/config.toml @@ -21,3 +21,250 @@ disqusShortname = "pietrushnics-world" category = "categories" author = "authors" tag = "tags" + +[menu] +[[menu.main]] + identifier = 'company' + name = 'This is the company section' + title = 'Company' + url = '/company' + weight = -110 +[[menu.main]] + identifier = 'about-us' + parent = 'company' + name = 'This is the about us section' + title = 'About Us' + url = '/company/about-us' + weight = -110 +[[menu.main]] + identifier = 'customers' + parent = 'company' + name = 'This is the customers section' + title = 'Customers' + url = '/company/about-us#customers' + weight = -109 +[[menu.main]] + identifier = 'careers' + parent = 'company' + name = 'This is the careers section' + title = 'Careers' + url = '/company/careers' + weight = -108 +[[menu.main]] + identifier = 'markets' + parent = 'company' + name = 'This is the markets section' + title = 'Markets' + url = '/company/markets' + weight = -107 +[[menu.main]] + identifier = 'faq' + parent = 'company' + name = 'This is the faq section' + title = 'FAQ' + url = '/company/faq' + weight = -106 +[[menu.main]] + identifier = 'logo-policy' + parent = 'company' + name = 'This is the logo policy section' + title = 'Logo Policy' + url = '/company/logo-policy' + weight = -105 +[[menu.main]] + identifier = 'products' + name = 'This is the products section' + title = 'Products' + url = '/products' + weight = -100 +[[menu.main]] + identifier = 'open-source-software' + parent = 'products' + name = 'This is the open-source software section' + title = 'Open-Source Software' + url = '/products/open-source-software' + weight = -105 +[[menu.main]] + identifier = 'open-source-hardware' + parent = 'products' + name = 'This is the open-source hardware section' + title = 'Open-Source Hardware' + url = '/products/open-source-hardware' + weight = -104 +[[menu.main]] + identifier = 'products-documentation' + parent = 'products' + name = 'This is the products documentation section' + title = 'Products Documentation' + url = '/products/products-documentation' + weight = -103 +[[menu.main]] + identifier = 'services' + name = 'This is the services section' + title = 'Services' + url = '/services' + weight = -90 +[[menu.main]] + identifier = 'embedded-firmware' + parent = 'services' + name = 'This is the Embedded Firmware section' + title = 'Embedded Firmware' + url = '/services/embedded-firmware' + weight = -105 +[[menu.main]] + identifier = 'operating-systems' + parent = 'services' + name = 'This is the Operating Systems section' + title = 'Operating Systems' + url = '/services/operating-systems' + weight = -104 +[[menu.main]] + identifier = 'hypervisors' + parent = 'services' + name = 'This is the Hypervisors section' + title = 'Hypervisors' + url = '/services/hypervisors' + weight = -103 +[[menu.main]] + identifier = 'software-and-hardware-security' + parent = 'services' + name = 'This is the Software and Hardware Security section' + title = 'Software and Hardware Security' + url = '/services/software-and-hardware-security' + weight = -102 +[[menu.main]] + identifier = 'hardware-support' + parent = 'services' + name = 'This is the Hardware Support section' + title = 'Hardware Support' + url = '/services/hardware-support' + weight = -101 +[[menu.main]] + identifier = 'internet-of-things-solutions' + parent = 'services' + name = 'This is the Internet of Things Solutions section' + title = 'Internet of Things Solutions' + url = '/services/internet-of-things-solutions' + weight = -100 +[[menu.main]] + identifier = 'automated-validation' + parent = 'services' + name = 'This is the Automated Validation section' + title = 'Automated Validation' + url = '/services/automated-validation' + weight = -99 +[[menu.main]] + identifier = 'service-catalogues' + parent = 'services' + name = 'This is the Services Catalogues section' + title = 'Services Catalogues' + url = '/services/service-catalogues' + weight = -98 +[[menu.main]] + identifier = 'training' + name = 'This is the Training section' + title = 'Training' + url = '/products/training' + weight = -80 +[[menu.main]] + identifier = 'coreboot-for-embedded-linux-developers' + parent = 'training' + name = 'This is the coreboot for Embedded Linux Developers section' + title = 'coreboot for Embedded Linux Developers' + url = '/products/training/#coreboot-for-embedded-linux-developers' + weight = -105 +[[menu.main]] + identifier = 'building-and-development-of-embedded-linux-systems' + parent = 'training' + name = 'This is the Building and development of Embedded Linux Systems section' + title = 'Building and development of Embedded Linux Systems' + url = '/products/training/#building-and-development-of-embedded-linux-systems' + weight = -104 +[[menu.main]] + identifier = 'yocto-project-development' + parent = 'training' + name = 'This is the Yocto project development section' + title = 'Yocto project development' + url = '/products/training/#yocto-project-development' + weight = -103 +[[menu.main]] + identifier = 'uefi-offensive-security' + parent = 'training' + name = 'This is the UEFI offensive security section' + title = 'UEFI offensive security' + url = '/products/training/#uefi-offensive-security' + weight = -102 +[[menu.main]] + identifier = 'uefi-advanced-concepts' + parent = 'training' + name = 'This is the UEFI advanced concepts section' + title = 'UEFI advanced concepts' + url = '/products/training/#uefi-advanced-concepts' + weight = -101 +[[menu.main]] + identifier = 'uefi-fundamentals' + parent = 'training' + name = 'This is the UEFI fundamentals section' + title = 'UEFI fundamentals' + url = '/products/training/#uefi-fundamentals' + weight = -100 +[[menu.main]] + identifier = 'uefi-practical-firmware-development' + parent = 'training' + name = 'This is the UEFI practical firmware development section' + title = 'UEFI practical firmware development' + url = '/products/training/#uefi-practical-firmware-development' + weight = -99 +[[menu.main]] + identifier = 'news' + name = 'This is the News section' + title = 'News' + url = '/news' + weight = -70 +[[menu.main]] + identifier = 'blog' + parent = 'news' + name = 'This is the Blog section' + title = 'Blog' + url = '/blog' + weight = -105 +[[menu.main]] + identifier = 'events' + parent = 'news' + name = 'This is the Events section' + title = 'Events' + url = '/news/events' + weight = -105 +[[menu.main]] + identifier = 'press-releases' + parent = 'news' + name = 'This is the Press Releases section' + title = 'Press Releases' + url = '/news/press-releases' + weight = -104 +[[menu.main]] + identifier = 'our-contribution' + parent = 'news' + name = 'This is the Our Contribution section' + title = 'Our Contribution' + url = 'https://opensource.3mdeb.com' + weight = -103 +[[menu.main]] + identifier = 'containers' + parent = 'news' + name = 'This is the Containers section' + title = 'Containers' + url = 'https://containers.3mdeb.com' + weight = -102 +[[menu.main]] + identifier = 'shop' + name = 'This is the Shop section' + title = 'Shop' + url = 'https://shop.3mdeb.com' + weight = -60 +[[menu.main]] + identifier = 'contact' + name = 'This is the Contact section' + title = 'Contact' + url = '/contact' + weight = -50 diff --git a/blog/themes/3mdeb/content/about.md b/blog/themes/3mdeb/content/about.md deleted file mode 100644 index 77adcf16a..000000000 --- a/blog/themes/3mdeb/content/about.md +++ /dev/null @@ -1,18 +0,0 @@ -+++ -title = "About Hugo" -date = "2014-04-09" -menu = "main" -+++ - -Hugo is the **world’s fastest framework for building websites**. It is written in Go. - -It makes use of a variety of open source projects including: - -* https://github.com/russross/blackfriday -* https://github.com/alecthomas/chroma -* https://github.com/muesli/smartcrop -* https://github.com/spf13/cobra -* https://github.com/spf13/viper - -Learn more and contribute on [GitHub](https://github.com/gohugoio). - diff --git a/blog/themes/3mdeb/layouts/partials/header.html b/blog/themes/3mdeb/layouts/partials/header.html index 606c30a6b..4f79d380f 100755 --- a/blog/themes/3mdeb/layouts/partials/header.html +++ b/blog/themes/3mdeb/layouts/partials/header.html @@ -78,62 +78,28 @@ From 39a4c7379165a9e098649f704856c037928cc644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kr=C3=B3l?= Date: Wed, 16 Mar 2022 16:28:46 +0100 Subject: [PATCH 2/3] blog/themes/3mdeb/layouts/post/list.html: align design with blog main page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Król --- blog/themes/3mdeb/layouts/post/list.html | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/blog/themes/3mdeb/layouts/post/list.html b/blog/themes/3mdeb/layouts/post/list.html index e26095023..5e3ad7486 100644 --- a/blog/themes/3mdeb/layouts/post/list.html +++ b/blog/themes/3mdeb/layouts/post/list.html @@ -1,15 +1,15 @@ {{ define "main" }} -{{ $archive := lower .Title }} +{{ $paginator := .Paginate (where .Site.RegularPages "Section" "post").ByPublishDate.Reverse }}
-{{ range $key, $value := .Site.Taxonomies.archives }}{{ if eq $key $archive }}{{ range $value.Pages }} + {{ range $paginator.Pages }} -
-{{ end }}{{ end }}{{ end }} + {{ end }}
@@ -61,6 +60,20 @@ {{ partial "widget-tags.html" . }}
- +
+
+ +
+
{{ end }} From 69f77aa9e032702a81c8dfe260432321d26edecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kr=C3=B3l?= Date: Wed, 16 Mar 2022 17:03:33 +0100 Subject: [PATCH 3/3] add blog under news->blog menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Król --- blog/config.toml | 12 ++++++------ blog/content/post/_index.md | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 blog/content/post/_index.md diff --git a/blog/config.toml b/blog/config.toml index 0c14e1596..09a358a0f 100644 --- a/blog/config.toml +++ b/blog/config.toml @@ -224,9 +224,9 @@ disqusShortname = "pietrushnics-world" [[menu.main]] identifier = 'blog' parent = 'news' - name = 'This is the Blog section' + name = 'Thoughts dereferenced from the scratchpad noise' title = 'Blog' - url = '/blog' + url = '/post' weight = -105 [[menu.main]] identifier = 'events' @@ -234,28 +234,28 @@ disqusShortname = "pietrushnics-world" name = 'This is the Events section' title = 'Events' url = '/news/events' - weight = -105 + weight = -104 [[menu.main]] identifier = 'press-releases' parent = 'news' name = 'This is the Press Releases section' title = 'Press Releases' url = '/news/press-releases' - weight = -104 + weight = -103 [[menu.main]] identifier = 'our-contribution' parent = 'news' name = 'This is the Our Contribution section' title = 'Our Contribution' url = 'https://opensource.3mdeb.com' - weight = -103 + weight = -102 [[menu.main]] identifier = 'containers' parent = 'news' name = 'This is the Containers section' title = 'Containers' url = 'https://containers.3mdeb.com' - weight = -102 + weight = -101 [[menu.main]] identifier = 'shop' name = 'This is the Shop section' diff --git a/blog/content/post/_index.md b/blog/content/post/_index.md new file mode 100644 index 000000000..42a0e314e --- /dev/null +++ b/blog/content/post/_index.md @@ -0,0 +1,6 @@ +--- +title: "Thoughts dereferenced from the scratchpad noise" +date: 2022-03-16T10:30:30+02:00 +layout: "post" +noindex: true +---