Dev (#24)
* added contact page and updated links Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * Feature/blog (#22) * updated blogpost component Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added first post and template post Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * updated styles Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * tweaked stuff Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added custom header components Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * updated scss Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added placeholder for future reference Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * tweaked around styles a bit :3 Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added basic search to blogposts Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added pdading to md Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * fixed css issue Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * tweaked css to make links more visible for blogposts Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> --------- Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * updated footer Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * added ability to view draft sites Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> * changed 501 to 404 Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com> --------- Signed-off-by: Ash Entwisle <ash.entwisle@protonmail.com>pull/5/head
parent
d002a6e808
commit
fcdc6a4fa1
|
@ -51,16 +51,16 @@ import Copywright from "./Copywright.astro"
|
||||||
links={[
|
links={[
|
||||||
{
|
{
|
||||||
name: "Discord",
|
name: "Discord",
|
||||||
href: "links/discord"
|
href: "/links/discord"
|
||||||
}, {
|
}, {
|
||||||
name: "GitHub",
|
name: "GitHub",
|
||||||
href: "links/github"
|
href: "/links/github"
|
||||||
}, {
|
}, {
|
||||||
name: "Instagram",
|
name: "Instagram",
|
||||||
href: "links/instagram"
|
href: "/links/instagram"
|
||||||
}, {
|
}, {
|
||||||
name: "HUSU",
|
name: "HUSU",
|
||||||
href: "links/husu"
|
href: "/links/husu"
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -14,13 +14,16 @@ const url = Astro.url.pathname.split("/").pop();
|
||||||
|
|
||||||
const headings = Astro.props.headings || [];
|
const headings = Astro.props.headings || [];
|
||||||
|
|
||||||
|
const draft_view = Astro.url.searchParams.get("draft") === "true";
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
{
|
{
|
||||||
props.frontmatter.draft ?
|
props.frontmatter.draft && !draft_view ?
|
||||||
<Error code="501" title="Draft">
|
<Error code="404" title="Page not Found">
|
||||||
Sorry, the page `<code>{Astro.url}</code>` is in draft mode.
|
Sorry, the page `<code>{Astro.url}</code>` does not exist,
|
||||||
|
Click <a href="/">here</a> to go back to the homepage.
|
||||||
</Error>
|
</Error>
|
||||||
:
|
:
|
||||||
<Markdown frontmatter={props.frontmatter}>
|
<Markdown frontmatter={props.frontmatter}>
|
||||||
|
|
|
@ -23,6 +23,8 @@ If you set `draft: true` then the blogpost will not be published. If you set `dr
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
to access a draft post, put "?draft=true" at the end of the url.
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
***DO NOT EDIT THE LAYOUT !!!!!!***
|
***DO NOT EDIT THE LAYOUT !!!!!!***
|
Loading…
Reference in New Issue