From 462659a9fcff2f61d752a85651433964ce40449b Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 19 Mar 2013 12:17:00 -0600 Subject: [PATCH] Use index.html instead of example-list.html The original decision to avoid index.html was because it only works with a build step. Since we've all accepted a build step, the more sensible name is index.html. Without this change, every hosted example has a link to http://openlayers.github.com/ol3/master/examples/example-list.html which 404s. --- bin/example-screenshot.js | 2 +- bin/exampleparser.py | 4 ++-- build.py | 5 ++--- examples/anchored-elements.html | 2 +- examples/animation.html | 2 +- examples/bind-input.html | 2 +- examples/bing-maps.html | 2 +- examples/brightness-contrast.html | 2 +- examples/canvas-tiles.html | 2 +- examples/epsg-4326.html | 2 +- examples/export-jpeg.html | 2 +- examples/geolocation.html | 2 +- examples/hue-saturation.html | 2 +- examples/{example-list.html => index.html} | 2 +- examples/mapquest.html | 2 +- examples/mouse-position.html | 2 +- examples/rotation.html | 2 +- examples/scale-line.html | 2 +- examples/semi-transparent-layer.html | 2 +- examples/side-by-side.html | 2 +- examples/simple.html | 2 +- examples/stamen.html | 2 +- examples/style-rules.html | 2 +- examples/tilejson.html | 2 +- examples/vector-layer.html | 2 +- examples/wms-capabilities.html | 2 +- examples/wms-custom-proj.html | 2 +- examples/wms-single-image-custom-proj.html | 2 +- examples/wms-single-image.html | 2 +- examples/wms-tiled.html | 2 +- examples/wmts-from-capabilities.html | 2 +- examples/wmts.html | 2 +- examples/zoomslider.html | 2 +- 33 files changed, 35 insertions(+), 36 deletions(-) rename examples/{example-list.html => index.html} (98%) diff --git a/bin/example-screenshot.js b/bin/example-screenshot.js index 9904316c36..ac86cfaba3 100644 --- a/bin/example-screenshot.js +++ b/bin/example-screenshot.js @@ -42,7 +42,7 @@ exampleDir = system.args[2], // various settings ignoreFiles = [ - 'example-list.html' + 'index.html' ], intervalMillisecs = 25, renderMillisecs = 2000, diff --git a/bin/exampleparser.py b/bin/exampleparser.py index 042e83c246..573198a132 100755 --- a/bin/exampleparser.py +++ b/bin/exampleparser.py @@ -38,11 +38,11 @@ feedPath = "http://openlayers.github.com/ol3/master/examples/" def getListOfExamples(relPath): """ returns list of .html filenames within a given path - excludes - example-list.html + index.html """ examples = os.listdir(relPath) examples = [example for example in examples if - example.endswith('.html') and example != "example-list.html"] + example.endswith('.html') and example != "index.html"] return examples diff --git a/build.py b/build.py index 01205ef6df..fdbe1478a8 100755 --- a/build.py +++ b/build.py @@ -51,7 +51,7 @@ EXAMPLES = [path for path in ifind('examples') if not path.startswith('examples/standalone/') if path.endswith('.html') - if path != 'examples/example-list.html'] + if path != 'examples/index.html'] EXAMPLES_JSON = [example.replace('.html', '.json') for example in EXAMPLES] @@ -425,8 +425,7 @@ def hostexamples(t): t.cp('build/loader_hosted_examples.js', examples_dir + '/loader.js') t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js', 'build/ol.css', build_dir) - t.cp('examples/example-list.html', examples_dir + '/index.html') - t.cp('examples/example-list.js', 'examples/example-list.xml', + t.cp('examples/index.html', 'examples/example-list.js', 'examples/example-list.xml', 'examples/Jugl.js', 'examples/jquery.min.js', 'examples/social-links.js', examples_dir) t.rm_rf('build/gh-pages/%(BRANCH)s/closure-library') t.makedirs('build/gh-pages/%(BRANCH)s/closure-library') diff --git a/examples/anchored-elements.html b/examples/anchored-elements.html index 2c76782c3e..16833dd89b 100644 --- a/examples/anchored-elements.html +++ b/examples/anchored-elements.html @@ -69,7 +69,7 @@