From 455e23f22b796c900568d1b772e5af68ede95604 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 28 Dec 2021 11:28:20 +0100 Subject: [PATCH] feat: page links (#446) --- exampleSite/content/page/links/index.md | 37 ++++++++++++++++++ .../content/page/links/ts-logo-128.jpg | Bin 0 -> 2071 bytes layouts/_default/single.html | 4 ++ .../partials/article/components/links.html | 26 ++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 exampleSite/content/page/links/index.md create mode 100644 exampleSite/content/page/links/ts-logo-128.jpg create mode 100644 layouts/partials/article/components/links.html diff --git a/exampleSite/content/page/links/index.md b/exampleSite/content/page/links/index.md new file mode 100644 index 0000000..9e29bf3 --- /dev/null +++ b/exampleSite/content/page/links/index.md @@ -0,0 +1,37 @@ +--- +title: Links +links: + - title: GitHub + description: GitHub is the world's largest software development platform. + website: https://github.com + image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + - title: TypeScript + description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. + website: https://www.typescriptlang.org + image: ts-logo-128.jpg +menu: + main: + weight: -50 + params: + icon: link + +comments: false +--- + +To use this feature, add `links` section to frontmatter. + +This page's frontmatter: + +```yaml +links: + - title: GitHub + description: GitHub is the world's largest software development platform. + website: https://github.com + image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + - title: TypeScript + description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. + website: https://www.typescriptlang.org + image: ts-logo-128.jpg +``` + +`image` field accepts both local and external images. \ No newline at end of file diff --git a/exampleSite/content/page/links/ts-logo-128.jpg b/exampleSite/content/page/links/ts-logo-128.jpg new file mode 100644 index 0000000000000000000000000000000000000000..85e33236069a2534315630db8bfef9e02166c3e1 GIT binary patch literal 2071 zcmbuAX;2eL7RNgW;U1De7(pO`1XcoqLc+?S5N=_D5)K845RRZC9sz@0A!~=uGfH)i?XDNc9AgE|I&g@jp?$>>1c_=F>tEecef2a1Hx+V&VL}}`2Y0Fd3Y$JA~e3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