Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-homepage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8207cb3758d0
Choose a base ref
...
head repository: NixOS/nixos-homepage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 373e7cadef98
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 6, 2020

  1. redirect old urls which are found by analytics (#380)

    Also:
    * set root explicitly, fixes #354
    garbas authored Apr 6, 2020
    1
    Copy the full SHA
    373e7ca View commit details
Showing with 91 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +11 −2 Makefile
  3. +78 −0 netlify.toml
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -14,7 +14,9 @@
/blogs.json
/blogs.xml
/favicon.png
/favicon.ico
/news-rss.xml
/nixos-release.tt
/robots.txt

/result*
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NIXOS_SERIES = 19.09
ROOT = "/"

rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))

@@ -63,21 +64,29 @@ $(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 $< $@

%.html: %.tt layout.tt common.tt nix-release.tt nixos-release.tt donation.tt
tpage \
--pre_chomp --post_chomp \
--define root=`echo $@ | sed -e 's|[^/]||g' -e 's|/|../|g'` \
--define root=$(ROOT) \
--define fileName=$< \
--define nixosAmis=$(NIXOS_AMIS) \
--define nixosAzureBlobs=$(NIXOS_AZURE_BLOBS) \
78 changes: 78 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -107,3 +107,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