From 16b95a8d75cdb256ab9057aa98de91b960e1f9bb Mon Sep 17 00:00:00 2001 From: Ash Entwisle Date: Tue, 19 Sep 2023 02:20:29 +0000 Subject: [PATCH] edited redirects, there is probably a better way but the astro.config.redirects werent working :/, I may need to open an issue Signed-off-by: Ash Entwisle --- astro.config.mjs | 4 +++- src/components/Header.astro | 12 +++++++++--- src/pages/links/discord.astro | 3 +++ src/pages/links/facebook.astro | 3 +++ src/pages/links/github.astro | 3 +++ src/pages/links/husu.astro | 3 +++ src/pages/links/index.astro | 3 +++ src/pages/links/instagram.astro | 3 +++ src/pages/links/linkedin.astro | 3 +++ src/pages/links/twitter.astro | 3 +++ src/pages/links/x.astro | 3 +++ src/pages/posts/template.mdx | 29 +++++++++++++++++++++++++++++ 12 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 src/pages/links/discord.astro create mode 100644 src/pages/links/facebook.astro create mode 100644 src/pages/links/github.astro create mode 100644 src/pages/links/husu.astro create mode 100644 src/pages/links/index.astro create mode 100644 src/pages/links/instagram.astro create mode 100644 src/pages/links/linkedin.astro create mode 100644 src/pages/links/twitter.astro create mode 100644 src/pages/links/x.astro diff --git a/astro.config.mjs b/astro.config.mjs index d137c8b..58521cb 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,5 +11,7 @@ import cloudflare from "@astrojs/cloudflare"; export default defineConfig({ integrations: [tailwind(), mdx(), partytown(), sitemap(), prefetch()], output: "server", - adapter: cloudflare() + adapter: cloudflare(), + redirects: { + } }); \ No newline at end of file diff --git a/src/components/Header.astro b/src/components/Header.astro index 92ad6c9..9870ab7 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -10,13 +10,19 @@
- button 1 + about
- button 2 + blog
- button 3 + contact
+
+ discord +
+
+ github +
diff --git a/src/pages/links/discord.astro b/src/pages/links/discord.astro new file mode 100644 index 0000000..18a96b2 --- /dev/null +++ b/src/pages/links/discord.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://discord.gg/sYeBPrjA"); +--- diff --git a/src/pages/links/facebook.astro b/src/pages/links/facebook.astro new file mode 100644 index 0000000..63734c0 --- /dev/null +++ b/src/pages/links/facebook.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://facebook.com/hullCSS"); +--- diff --git a/src/pages/links/github.astro b/src/pages/links/github.astro new file mode 100644 index 0000000..c0977a6 --- /dev/null +++ b/src/pages/links/github.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://github.com/hullcss"); +--- diff --git a/src/pages/links/husu.astro b/src/pages/links/husu.astro new file mode 100644 index 0000000..60e07a8 --- /dev/null +++ b/src/pages/links/husu.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://hullstudent.com/groups/hull-css"); +--- diff --git a/src/pages/links/index.astro b/src/pages/links/index.astro new file mode 100644 index 0000000..707eb1d --- /dev/null +++ b/src/pages/links/index.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://linktr.ee/hullcss"); +--- \ No newline at end of file diff --git a/src/pages/links/instagram.astro b/src/pages/links/instagram.astro new file mode 100644 index 0000000..2ec2191 --- /dev/null +++ b/src/pages/links/instagram.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://instagram.com/hull_css/"); +--- diff --git a/src/pages/links/linkedin.astro b/src/pages/links/linkedin.astro new file mode 100644 index 0000000..c1963fb --- /dev/null +++ b/src/pages/links/linkedin.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://linkedin.com/company/hullcss"); +--- diff --git a/src/pages/links/twitter.astro b/src/pages/links/twitter.astro new file mode 100644 index 0000000..697ec65 --- /dev/null +++ b/src/pages/links/twitter.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://twitter.com/hull_CSS"); +--- diff --git a/src/pages/links/x.astro b/src/pages/links/x.astro new file mode 100644 index 0000000..697ec65 --- /dev/null +++ b/src/pages/links/x.astro @@ -0,0 +1,3 @@ +--- +return Astro.redirect("https://twitter.com/hull_CSS"); +--- diff --git a/src/pages/posts/template.mdx b/src/pages/posts/template.mdx index e69de29..790192f 100644 --- a/src/pages/posts/template.mdx +++ b/src/pages/posts/template.mdx @@ -0,0 +1,29 @@ +--- +# Edit all of this +# title: "Example Title" +# author: "Ash Entwisle" +# title: "Webmaster" +# date: "2023-01-31" +# description: "Example description" +# tags: ["Tag 1", "Tag 2", "..."] +# draft: true # set to false to publish + +# Don't edit this +# layout: ../layouts/Blogpost.astro +--- + +# This is an example Blogpost + +This is an example blogpost. You can edit this file to create your own blogpost. + +This uses markdown, so you can use all the usual markdown features. + +## draft + +If you set `draft: true` then the blogpost will not be published. If you set `draft: false` then the blogpost will be published. + +if someone tries to access a draft blogpost, they will get an unauthorised error, once draft is set to false, they will be able to access it. + +## Layout + +DO NOT EDIT THE LAYOUT !!!!!! \ No newline at end of file