Add redirect
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "themes/hugo-redirect"]
|
||||
path = themes/hugo-redirect
|
||||
url = https://github.com/gcc42/hugo-redirect.git
|
||||
@@ -1,5 +1,5 @@
|
||||
baseURL: "https://fundor333.com"
|
||||
DefaultContentLanguage: en
|
||||
languageCode: en
|
||||
theme: ["github.com/fundor333/macha-theme"]
|
||||
theme: ["hugo-redirect","github.com/fundor333/macha-theme"]
|
||||
title: Fundor333
|
||||
|
||||
6
content/_htaccess.md
Normal file
6
content/_htaccess.md
Normal file
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
url = "/.htaccess"
|
||||
outputs = ["redirects"]
|
||||
draft = true
|
||||
private = true
|
||||
+++
|
||||
@@ -3,14 +3,8 @@ title: "Fundor333"
|
||||
type: home
|
||||
specialpost: true
|
||||
---
|
||||
> This blog was born by my personal desider of show what I do and what i am looking for. All this is done by my own free time.
|
||||
>
|
||||
> If you want to see what I am doing [now]( {{< relref "now.md" >}}) check my [now]( {{< relref "now.md" >}}) page.
|
||||
>
|
||||
> [Here](/event/) you can find all the events I go and went to and the events details.
|
||||
>
|
||||
> If you want to contact me for work [here](/cv/) there is a web version of my CV and my contacts for jobs.
|
||||
>
|
||||
> If you need my GPG key [here](https://keybase.io/fundor333/key.asc) my key and the mail is blog@fundor333.com
|
||||
>
|
||||
> fundor 333
|
||||
Pythonista, Backend Developer, Photographer, Dev Ops, Ex-Scout, Bookworm and Tea Lover.
|
||||
Sometime you can find me in a GDG, a DataBeers, a Pycon, a Comicon or other similar event.
|
||||
Huge Open Source fan and user I am allways searching something new to do or to study.
|
||||
Huge fan of automation, autodeploy, data sharing and bots.
|
||||
A lot of my personal stuff are here in my blog and some in my Github.
|
||||
|
||||
6
content/_redirects.md
Normal file
6
content/_redirects.md
Normal file
@@ -0,0 +1,6 @@
|
||||
+++
|
||||
url = "/_redirects"
|
||||
outputs = ["redirects"]
|
||||
draft = true
|
||||
private = true
|
||||
+++
|
||||
9
content/redirect/cosplay/index.md
Normal file
9
content/redirect/cosplay/index.md
Normal file
@@ -0,0 +1,9 @@
|
||||
+++
|
||||
# For example, to Redirect from /old_blog to /blog, set
|
||||
# url to "/old_blog" and redirect_to to "/blog" below
|
||||
type = "redirect"
|
||||
url = "/cosplay"
|
||||
redirect_to = "https://photo.fundor333.com/"
|
||||
redirect_enabled = true
|
||||
private = true
|
||||
+++
|
||||
@@ -11,5 +11,5 @@ mp-syndicate-to:
|
||||
slug: the-downfall-of-wordpress
|
||||
micropub: bookmark
|
||||
layout: social
|
||||
date: '2022/08/30'
|
||||
date: '2022-08-29T11:39:26'
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "--news--"
|
||||
title: "News"
|
||||
type: social
|
||||
specialpost: true
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -16,4 +16,4 @@ require (
|
||||
// https://github.com/rootwork/hugo-module-site#local-theme-development
|
||||
|
||||
// replace github.com/fundor333/fugu-theme => /Users/matteoscarpa/Coding/Personale/fugu-theme
|
||||
// replace github.com/fundor333/macha-theme => /Users/matteoscarpa/Coding/Personale/macia-theme
|
||||
replace github.com/fundor333/macha-theme => /Users/matteoscarpa/Coding/Personale/macia-theme
|
||||
|
||||
@@ -12,6 +12,12 @@ def post_photo():
|
||||
os.system(f"hugo new photos/{year}/{name.replace(' ','-').replace(',','').lower()}/index.md")
|
||||
|
||||
|
||||
def post_redirect():
|
||||
# get the current year as variable
|
||||
name = input("Give me the title\n")
|
||||
os.system(f"hugo new redirect/{name.replace(' ','-').replace(',','').lower()}/index.md")
|
||||
|
||||
|
||||
def post_fc():
|
||||
# get the current year as variable
|
||||
year = str(datetime.datetime.now().year)
|
||||
@@ -33,7 +39,7 @@ def quiet_fc():
|
||||
print(f"Generated {generated}.md")
|
||||
|
||||
|
||||
ANSWER = {"post": post_fc, "quiet": quiet_fc, 'photo': post_photo}
|
||||
ANSWER = {"post": post_fc, "quiet": quiet_fc, 'photo': post_photo, 'redirect': post_redirect}
|
||||
|
||||
|
||||
def main_checker():
|
||||
|
||||
1
themes/hugo-redirect
Submodule
1
themes/hugo-redirect
Submodule
Submodule themes/hugo-redirect added at debb247576
Reference in New Issue
Block a user