mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 03:36:41 +02:00
Add example site
* Revert back to using author in params
This commit is contained in:
17
exampleSite/content/fixed/about.md
Normal file
17
exampleSite/content/fixed/about.md
Normal file
@@ -0,0 +1,17 @@
|
||||
+++
|
||||
date = "2015-08-22T06:42:21-07:00"
|
||||
draft = false
|
||||
title = "about"
|
||||
|
||||
+++
|
||||
|
||||
TODO: Page not complete yet.
|
||||
|
||||
Information about you.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
15
exampleSite/content/fixed/code.md
Normal file
15
exampleSite/content/fixed/code.md
Normal file
@@ -0,0 +1,15 @@
|
||||
+++
|
||||
date = "2015-08-19T20:29:37-07:00"
|
||||
draft = false
|
||||
title = "code"
|
||||
|
||||
+++
|
||||
|
||||
TODO: Page not complete yet.
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
22
exampleSite/content/posts/redirect-webpages.md
Normal file
22
exampleSite/content/posts/redirect-webpages.md
Normal file
@@ -0,0 +1,22 @@
|
||||
+++
|
||||
date = "2015-08-22T15:45:30-07:00"
|
||||
draft = false
|
||||
title = "Redirect webpages using HTML"
|
||||
slug = "redirect-webpages-html"
|
||||
|
||||
+++
|
||||
|
||||
Webpage redirection is great for automatically redirecting people visiting an old URL to a new URL where the content has moved to. It can be done using JavaScript, but there is also a convenient HTML-only solution.
|
||||
|
||||
To redirect visitors reaching `yourwebsite.com/blog` to `yourwebsite.com/posts`, add this to the `<head>` section of the HTML at `yourwebsite.com/blog`:
|
||||
|
||||
{{< highlight html "linenos=inline" >}}
|
||||
<meta http-equiv="refresh" content="0;url='/posts'" />
|
||||
<link rel="canonical" href="/posts" />
|
||||
{{</highlight>}}
|
||||
|
||||
### walkthrough
|
||||
|
||||
Setting `http-equiv="refresh"` in the first line performs the actual redirect. The number in the `content` attribute specified in seconds tells the browser how long to wait before redirecting. In this example, `0` redirects immediately. Increasing the wait may be useful for briefly displaying a 404 page before automatically switching to the home page. The `url` specfies the destination for the redirect. In this example, we wanted to switch to `/posts`.
|
||||
|
||||
The second line is optional; it helps search engines know which the preferred version of the page is. Usually, this is the redirect destination.
|
Reference in New Issue
Block a user