Nicky Nicolson commited on
Commit
8405227
·
1 Parent(s): 2e38b26

rewrites for dynamic taxon pages

Browse files
Files changed (3) hide show
  1. Dockerfile +0 -2
  2. nginx/etc.nginx_nginx.conf +1 -1
  3. taxonomy/taxon.md +1 -0
Dockerfile CHANGED
@@ -19,8 +19,6 @@ RUN bundle exec jekyll build --baseurl ""
19
 
20
  RUN find /usr/src/app/_site -type f -ls
21
 
22
- RUN cat /usr/src/app/_site/taxonomy/browse.html
23
-
24
  #Copy _sites from build to Nginx Container to serve site
25
  USER root
26
  FROM nginx:latest
 
19
 
20
  RUN find /usr/src/app/_site -type f -ls
21
 
 
 
22
  #Copy _sites from build to Nginx Container to serve site
23
  USER root
24
  FROM nginx:latest
nginx/etc.nginx_nginx.conf CHANGED
@@ -28,7 +28,7 @@ http {
28
  rewrite ^ /taxonomy/browse.html break;
29
  }
30
  location ~ ^/taxonomy/taxon/[^/]+$ {
31
- try_files /taxonomy/taxon/index.html =404;
32
  }
33
  }
34
  }
 
28
  rewrite ^ /taxonomy/browse.html break;
29
  }
30
  location ~ ^/taxonomy/taxon/[^/]+$ {
31
+ try_files /taxonomy/taxon.html =404;
32
  }
33
  }
34
  }
taxonomy/taxon.md CHANGED
@@ -41,6 +41,7 @@ ReactDOM.render(e(Taxon), domContainer);
41
  </script>
42
 
43
  <script>
 
44
  const taxonUrl = `//api.gbif.org/v1/species?datasetKey={{site.col.gbifDatasetKey}}&sourceId=${ location.pathname.substr(location.pathname.lastIndexOf('/') + 1)}`;
45
  fetch(taxonUrl)
46
  .then(function (response) {
 
41
  </script>
42
 
43
  <script>
44
+ console.log(location.pathname)
45
  const taxonUrl = `//api.gbif.org/v1/species?datasetKey={{site.col.gbifDatasetKey}}&sourceId=${ location.pathname.substr(location.pathname.lastIndexOf('/') + 1)}`;
46
  fetch(taxonUrl)
47
  .then(function (response) {