Added social link redirects
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
8f8dfc912b
commit
f6618a93ff
26
data.yaml
26
data.yaml
@ -3,6 +3,7 @@ intro: |
|
||||
I'm always happy to chat so feel free to drop me an email at <span><svg viewBox="0 0 64 50" height="32" style="fill:#ededed"><path d="m64 39.7-4-22.4c-.4-2-2.4-3.5-4.5-3l-31.7 5.5a4 4 0 0 0-3.2 4.1l4 22.8a3.8 3.8 0 0 0 4.5 3l31.7-5.5a3.8 3.8 0 0 0 3.1-4.5zm-2.7-3.6-10.7-8.2 7.7-8.6 3 16.8zM24 21.8l32-5.6h.3a2 2 0 0 1 1.5.7c-1 1.1-9.4 10.8-13.4 14.6-1 1-2.6 1.3-4 .6l-17.7-8.7a1.8 1.8 0 0 1 1.5-1.6zm-1.1 4 10.5 5.3L26 42.8l-3-17zm38.7 15.7c-.3.4-.7.6-1.2.7l-31.8 5.6a1.9 1.9 0 0 1-2.1-1.5l-.1-.6 8.8-13.8 4.2 2a5.6 5.6 0 0 0 6.1-1c1-.9 2.3-2.1 3.6-3.6L61.8 39l.2 1c0 .6 0 1-.3 1.5zM19 29.9a1 1 0 0 0-1.2-.8l-17 3a1 1 0 1 0 .4 2l17-3c.5-.2.9-.7.8-1.2zm1 5.8a1 1 0 0 0-1.1-.9L8.7 36.6a1 1 0 1 0 .3 2l10.2-1.8c.6 0 1-.6.8-1.1zm-.1 4.9L13 41.8a1 1 0 1 0 .3 2l6.8-1.2a1 1 0 1 0-.3-2z"></path></svg> <a href="mailto:hello@marcusnoble.co.uk">hello@marcusnoble.co.uk</a></span>, or using any of the other social links below.
|
||||
social:
|
||||
- url: https://marcusnoble.co.uk
|
||||
slug: "/blog"
|
||||
title: My articles on my Blog
|
||||
content: |
|
||||
<svg height="32" viewBox="0 0 512 512">
|
||||
@ -10,27 +11,32 @@ social:
|
||||
</svg>
|
||||
Blog
|
||||
- url: "mailto:hello@marcusnoble.co.uk"
|
||||
slug: ""
|
||||
title: Email me
|
||||
content: |
|
||||
<svg viewBox="0 0 64 64" height="32" style="fill:#ededed"><path d="m64 39.7-4-22.4c-.4-2-2.4-3.5-4.5-3l-31.7 5.5a4 4 0 0 0-3.2 4.1l4 22.8a3.8 3.8 0 0 0 4.5 3l31.7-5.5a3.8 3.8 0 0 0 3.1-4.5zm-2.7-3.6-10.7-8.2 7.7-8.6 3 16.8zM24 21.8l32-5.6h.3a2 2 0 0 1 1.5.7c-1 1.1-9.4 10.8-13.4 14.6-1 1-2.6 1.3-4 .6l-17.7-8.7a1.8 1.8 0 0 1 1.5-1.6zm-1.1 4 10.5 5.3L26 42.8l-3-17zm38.7 15.7c-.3.4-.7.6-1.2.7l-31.8 5.6a1.9 1.9 0 0 1-2.1-1.5l-.1-.6 8.8-13.8 4.2 2a5.6 5.6 0 0 0 6.1-1c1-.9 2.3-2.1 3.6-3.6L61.8 39l.2 1c0 .6 0 1-.3 1.5zM19 29.9a1 1 0 0 0-1.2-.8l-17 3a1 1 0 1 0 .4 2l17-3c.5-.2.9-.7.8-1.2zm1 5.8a1 1 0 0 0-1.1-.9L8.7 36.6a1 1 0 1 0 .3 2l10.2-1.8c.6 0 1-.6.8-1.1zm-.1 4.9L13 41.8a1 1 0 1 0 .3 2l6.8-1.2a1 1 0 1 0-.3-2z"></path></svg>
|
||||
Email
|
||||
- url: https://marcusnoble.co.uk
|
||||
title: My articles on my Blog
|
||||
- url: https://cv.marcusnoble.co.uk
|
||||
slug: "/cv"
|
||||
title: My CV
|
||||
content: |
|
||||
<svg viewBox="0 0 60 60" height="32"><path d="M39 0H6.4v60h47V14.6L38.9 0zm.5 3.4L50.1 14H39.5V3.4zM8.5 58V2h29v14h14v42h-43z"/><path d="M34.5 37a1 1 0 1 0 0-2h-17a1 1 0 1 0 0 2h17zm10-7h-7a1 1 0 1 0 0 2h7a1 1 0 1 0 0-2zm-23 1c0 .6.4 1 1 1h10a1 1 0 1 0 0-2h-10a1 1 0 0 0-1 1zm-4.7-.7a1 1 0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.4-.3v-.5l.5-1.6.2-.5.3-.9a5.3 5.3 0 0 0 2.7.4c3 0 3.5 1.3 3.6 2.6v.5l.6.3.1.3v.6c0 .2 0 .3-.2.3l-.5.2-.2.5c-.3 1.2-.9 2-1.8 2.4l-.6.2v1.5c0 .5.3 1 .8 1.3l2.4 1.2a9 9 0 0 1-8.5 0z"/></svg>
|
||||
C.V.
|
||||
- url: https://www.github.com/AverageMarcus
|
||||
title: AverageMarcus on GitHubBlog
|
||||
slug: "/github"
|
||||
title: AverageMarcus on GitHub
|
||||
content: |
|
||||
<svg viewBox="0 0 16 16" height="32"><path d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"></path></svg>
|
||||
GitHub
|
||||
- url: https://twitter.com/Marcus_Noble_
|
||||
title: "@Marcus_Noble_ on TwitterBlog"
|
||||
slug: "/twitter"
|
||||
title: "@Marcus_Noble_ on Twitter"
|
||||
content: |
|
||||
<svg viewBox="0 0 16 16" height="32"><path d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"></path></svg>
|
||||
Twitter
|
||||
- url: https://k8s.social/@Marcus
|
||||
title: "@marcus@k8s.social on MastodonBlog"
|
||||
slug: "/mastodon"
|
||||
title: "@marcus@k8s.social on Mastodon"
|
||||
content: |
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="80 80 360 360">
|
||||
<path d="m409 290c-5 24-43 50-85 56-86 11-137-6-137-6 3 13-4 54 70 52 31 0 58-7 58-7l2 27c-51 24-107 15-140 6-67-17-79-90-81-162v-59c0-74 49-96 49-96 50-24 180-22 222 0 0 0 49 22 49 96 0 0 1 55-7 93"></path>
|
||||
@ -38,7 +44,8 @@ social:
|
||||
</svg>
|
||||
Mastodon
|
||||
- url: https://www.linkedin.com/in/marcusnoble/
|
||||
title: Connect with me on LinkedinBlog
|
||||
slug: "/linkedin"
|
||||
title: Connect with me on Linkedin
|
||||
content: |
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" height="32">
|
||||
<rect width="512" height="512" rx="15%"></rect>
|
||||
@ -48,18 +55,21 @@ social:
|
||||
</svg>
|
||||
LinkedIn
|
||||
- url: https://noti.st/averagemarcus
|
||||
title: View my previous talks on NotistBlog
|
||||
slug: "/notist"
|
||||
title: View my previous talks on Notist
|
||||
content: |
|
||||
<svg height="32" viewBox="0 -20 520 218">
|
||||
<path d="M127.7 127.6a47 47 0 0 1-36.5 18.8c-16.4 0-26.4-9.8-26.4-22.1 0-17.6 9.2-29.1 9.2-40.4 0-4.6-2.6-8-6.7-8-4.9 0-11.8 4.9-18.1 17.5A146.2 146.2 0 0 0 36.8 139c0 4.8-2 6-6.3 6-8.7 0-19.9 1.4-24.2 1.4-3.8 0-6-1.4-6-6.3 0-10.7 12-49.5 12-65 0-5-2-5.6-2-9.3 0-6.3 15.6-10.7 32.3-10.7 6.3 0 9.8 2.6 9.8 7.5 0 4.6-2.3 13-2.3 13C55.2 69.3 72.2 55 89.2 55c15.9 0 22.2 7.2 22.2 18.2 0 13.2-8 27.6-8 39.4 0 7.5 4 10.4 9.2 10.4 4.9 0 7.2-2.3 10.9-6l.7-.8a44 44 0 0 1-.4-6.4c0-28 22.2-56 61.6-56 21.3 0 36 14 36 33.8 0 32.2-20.4 59.9-55.8 59.9-18 0-31.6-7.4-37.9-20zM291.2 113c2.2-15.1 8.7-29.4 8.7-38 0-4.9-1.7-5.5-1.7-9.2 0-6.3 15.3-10.7 32-10.7 6.3 0 9.8 2.6 9.8 7.5 0 11.6-9.3 29.7-9.3 48.7 0 7.5 4.4 11.8 9.5 11.8 3.8 0 6-1.3 8.6-3.7 1-7.7 7-12.1 13-12.1 7.8 0 12.4 3.7 12.4 10.6 0 7.2 2.6 12.1 7.8 12.1 4 0 6.3-2.6 6.3-7.8 0-17-28.5-19.5-28.5-41.1 0-18.2 18.2-27.4 39.8-27.4 21 0 30.5 8 30.5 19.9 0 7.8-4 14.7-13.5 14.7-5.5 0-10.4-4.4-10.4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 10.4-23.6 21.3-23.6C339.1.7 345 7.3 345 16c0 11.5-10.4 23.9-21.4 23.9-8.9 0-16-7-16-15.6zm-107.3 80.4c0-5-1.7-9.2-5.7-11-9-3.4-11.6-6.6-11.6-11.8 0-7.2 4.4-9.5 4.4-11.2 0-1.4-1-2.3-2.6-2.3-1.2 0-4 .9-8.1 4a40.6 40.6 0 0 0-14.1 32.9c0 13 7.5 21.3 18.7 21.3 11.5 0 19-11.8 19-22z" />
|
||||
</svg>
|
||||
Notist
|
||||
- url: https://youtube.com/playlist?list=PLT41C0Ggz5wa66-AU5xapbOuzkUKUPLzi
|
||||
title: My appearances on YouTubeBlog
|
||||
slug: "/youtube"
|
||||
title: My appearances on YouTube
|
||||
content: |
|
||||
<svg viewBox="0 0 490 490" height="32"><path d="M480 180v130a100 100 0 0 1-100 100H110A100 100 0 0 1 10 310V180A100 100 0 0 1 110 80h270a100 100 0 0 1 100 100z" fill="#ea4640"/><path fill="#fff" d="m320 245-120 50V195z"/><g fill="#231f20"><path d="M380 70H110A110 110 0 0 0 0 180v130a110 110 0 0 0 110 110h270a110 110 0 0 0 110-110V180A110 110 0 0 0 380 70zm90 240c0 49.6-40.4 90-90 90H110c-49.6 0-90-40.4-90-90V180c0-49.6 40.4-90 90-90h270c49.6 0 90 40.4 90 90v130z"/><path d="m323.8 235.8-120-50A10 10 0 0 0 190 195v100a10 10 0 0 0 13.8 9.2l120-50a10 10 0 0 0 0-18.4zM210 280v-70l84 35-84 35z"/></g></svg>
|
||||
YouTube
|
||||
- url: https://name.pn/marcus-noble
|
||||
slug: "/pronouns"
|
||||
title: More about my name and pronouns
|
||||
content: |
|
||||
<svg height="32" viewBox="0 0 54.826 54.826"><defs><linearGradient id="a"><stop offset="0" stop-color="#f41046"/><stop offset="1" stop-color="#f46f94"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="66.774" y1="137.431" x2="189.397" y2="14.807" gradientUnits="userSpaceOnUse"/><clipPath clipPathUnits="userSpaceOnUse" id="c"><path class="powerclip" d="M69.3 80.322h71.07v54.633H69.3zm-24.096 28.493v7.522h120.638v-7.522z" fill="#00f" stroke-width="2.598"/></clipPath></defs><path d="M77.805 61.062h54.06c6.277 0 11.33 5.052 11.33 11.329v54.06c0 6.276-5.053 11.33-11.33 11.33h-54.06a11.304 11.304 0 0 1-11.329-11.33v-54.06c0-6.277 5.053-11.33 11.33-11.33z" fill="url(#b)" transform="matrix(.71464 0 0 .71464 -47.506 -43.637)"/><path clip-path="url(#c)" d="M74.3 85.321v38.044c0 3.651 2.94 6.59 6.592 6.59h47.887a6.577 6.577 0 0 0 6.591-6.59V85.32H80.892z" fill="#fff" transform="matrix(.71464 0 0 .71464 -47.506 -43.637)"/></svg>
|
||||
|
7
main.go
7
main.go
@ -35,6 +35,13 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
for _, l := range data["social"].([]interface{}) {
|
||||
link := l.(map[interface{}]interface{})
|
||||
if link["slug"] != "" {
|
||||
http.Handle(link["slug"].(string), http.RedirectHandler(link["url"].(string), http.StatusTemporaryRedirect))
|
||||
}
|
||||
}
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
page := "src" + r.URL.Path
|
||||
if strings.HasSuffix(page, "/") {
|
||||
|
Loading…
Reference in New Issue
Block a user