diff --git a/_data/assets.yml b/_data/assets.yml index 91f0e45..4298782 100644 --- a/_data/assets.yml +++ b/_data/assets.yml @@ -8,4 +8,5 @@ scad: main.scad flags: -Dsize=[1,4,9] stl: gen/monolith.stl - images: ['gen/monolith.png'] + images: ['gen/monolith.png', 'HAL_2001_monolith.jpg'] + downloads: ['monolith.txt'] diff --git a/_layouts/base.html b/_layouts/base.html index bcb629f..8a9aa5b 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -24,7 +24,7 @@
- This 3D printable project is offered under an open source license. The site is built with software under various open source licenses. + This 3D printable project is offered under an open source license. The site is built with software under various open source licenses. Create your own MySTL site with cookiecutter-mystl (coming soon!).
Back to top diff --git a/readfile.scad b/_li similarity index 100% rename from readfile.scad rename to _li diff --git a/_lib/readfile.scad b/_lib/readfile.scad new file mode 100644 index 0000000..a0e67c1 --- /dev/null +++ b/_lib/readfile.scad @@ -0,0 +1,2 @@ +CONVEXITY=4; +import(input, convexity=CONVEXITY); diff --git a/_lib/rules.py b/_lib/rules.py index c4e3406..7be7e92 100755 --- a/_lib/rules.py +++ b/_lib/rules.py @@ -44,7 +44,7 @@ MAKE_STL_PNG = """ {target}: {src} \t$(ECHO) $target \t$(Q)mkdir -p $(dir {target}) -\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" readfile.scad +\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" _lib/readfile.scad \t$(Q)convert -geometry 25% {target}.tmp.png {target} \t$(Q)rm -f {target}.tmp.png default:: {target} diff --git a/index.md b/index.md index e1b5175..faa091a 100644 --- a/index.md +++ b/index.md @@ -1,13 +1,16 @@ --- layout: base -title: MySTL +title: MySTL Demonstration page --- {% for asset in site.data.assets %} + {% assign stlbasename = asset.stl | split: "/" | last | split: "." | first %} +### {{ asset.name }} {% for image in asset.images %} - {% if asset.stl %} + {% assign basename = image | split: "/" | last | split: "." | first %} + {% if basename == stlbasename %}