Skip to content

Commit

Permalink
redirect old urls which are found by analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
garbas committed Apr 3, 2020
1 parent c5780d9 commit d56019d
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -14,7 +14,9 @@
/blogs.json
/blogs.xml
/favicon.png
/favicon.ico
/news-rss.xml
/nixos-release.tt
/robots.txt

/result*
10 changes: 9 additions & 1 deletion Makefile
Expand Up @@ -61,14 +61,22 @@ $(NIXPKGS_MANUAL_OUT): $(NIXPKGS_MANUAL_IN) bootstrapify-docbook.sh bootstrapify
ln -sfn manual.html $(NIXPKGS_MANUAL_OUT)/index.html


all: $(HTML) favicon.png $(subst .png,-small.png,$(filter-out %-small.png,$(wildcard nixos/screenshots/*))) \
all: $(HTML) favicon.png favicon.ico robots.txt $(subst .png,-small.png,$(filter-out %-small.png,$(wildcard nixos/screenshots/*))) \
nixos/packages-explorer.js \
nixpkgs/packages-channels.json


robots.txt: $(HTML)
echo "Users-agent: *" >> $@
echo "Disallow: /" >> $@
for page in $(HTML); do echo "Allow: /$$page" >> $@; done

favicon.png: logo/nixos-logo-only-hires.png
convert -resize 16x16 -background none -gravity center -extent 16x16 $< $@

favicon.ico: favicon.png
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 -background transparent $< $@

%-small.png: %.png
convert -resize 200 $< $@

Expand Down
78 changes: 78 additions & 0 deletions netlify.toml
Expand Up @@ -83,3 +83,81 @@
to = "https://edolstra.github.io/:splat"
status = 301
force = true

[[redirects]]
from = "/nixpkgs/packages-nixos-19.09.json.gz"
to = "https://channels.nixos.org/nixos-19.09/packages.json.br"
status = 302
force = true

[[redirects]]
from = "/nixpkgs/packages-nixos-unstable.json.gz"
to = "https://channels.nixos.org/nixos-unstable/packages.json.br"
status = 302
force = true

[[redirects]]
from = "/patchelf.html"
to = "https://github.com/NixOS/patchelf"
status = 302
force = true

[[redirects]]
from = "/wiki/bootstrap/css/bootstrap.min.css"
to = "/bootstrap/css/bootstrap.min.css"
status = 302
force = true

[[redirects]]
from = "/wiki/bootstrap/css/bootstrap-responsive.min.css"
to = "/bootstrap/css/bootstrap-responsive.min.css"
status = 302
force = true

[[redirects]]
from = "/wiki/css/nixos-site.css"
to = "/css/nixos-site.css"
status = 302
force = true

[[redirects]]
from = "/wiki/bootstrap/js/bootstrap.min.js"
to = "/bootstrap/js/bootstrap.min.js"
status = 302
force = true

[[redirects]]
from = "/wiki/logo/nix-wiki.png"
to = "/logo/nix-wiki.png"
status = 302
force = true

[[redirects]]
from = "/wiki/js/jquery-ui.min.js"
to = "/js/jquery-ui.min.js"
status = 302
force = true

[[redirects]]
from = "/wiki/js/jquery.min.js"
to = "/js/jquery.min.js"
status = 302
force = true

[[redirects]]
from = "/~eelco/pubs/bootstrap/css/bootstrap-responsive.min.css"
to = "/bootstrap/css/bootstrap-responsive.min.css"
status = 302
force = true

[[redirects]]
from = "/~eelco/pubs/bootstrap/css/bootstrap.min.css"
to = "/bootstrap/css/bootstrap.min.css"
status = 302
force = true

[[redirects]]
from = "/~eelco/pubs/css/nixos-site.css"
to = "/css/nixos-site.css"
status = 302
force = true

0 comments on commit d56019d

Please sign in to comment.