Skip to content

Commit 903f91e

Browse files
committed
merge main
2 parents 4ada00d + 2778c87 commit 903f91e

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# eleventy-plugin-scad
1+
# eleventy-plugin-scad ![NPM Version](https://img.shields.io/npm/v/eleventy-plugin-scad)
22

3-
A plugin for Eleventy to showcase your SCAD files.
3+
A plugin for [Eleventy](https://www.11ty.dev) to showcase your SCAD files.
44

5-
![NPM Version](https://img.shields.io/npm/v/eleventy-plugin-scad)
5+
## Purpose
6+
7+
Use Eleventy to generate a site to showcase your OpenSCAD models. This plugin adds `.scad` as a template and will use your system's OpenSCAD to render the file into an STL. An additional HTML file with Three.js STL viewer is gererated as well.
68

79
## Install into Project
810

@@ -20,10 +22,15 @@ npm install eleventy-plugin-scad
2022
- **theme**: Use one of the core W3.org themes
2123
- Traditional, Modernist, Midnight, Chocolate, Oldstyle, Steely, Swiss, Ultramarine
2224
- **layout**: Use a custom layout for the scad files
23-
- **collectionPage**: Set `true` to generate a listing page from `collections.scad`
25+
- This is an escape hatch to make and use your own STL viewer layout. _(needs docs)_
26+
- **collectionPage**: Set `false` to disable the generation of a listing page with links from the `scad` tagged files _(uses Collections API)_
2427
- **verbose**: Set `true` to view the compilation output from OpenSCAD
25-
- **noSTL**: Set `true` to skip generating STLs
28+
- If your model uses `echo()` this is how to see the output
2629
- **silent**: Set `true` to disable all logging from the plugin
30+
- **noSTL**: Set `true` to skip generating STLs
31+
- Useful when models do not change frequently. Generate once, then disable STLs.
32+
- **checkLaunchPath**: Set `false` to disable the validity check of `launchPath`
33+
- Disable checking if the given `launchPath` exists _(added for testing)_
2734

2835
## Add Plugin to Eleventy
2936

@@ -78,3 +85,16 @@ export default async (eleventyConfig) => {
7885
});
7986
};
8087
```
88+
89+
On my linux machine, I use this instead
90+
91+
```js
92+
import { addOpenSCADPlugin, SCAD_BINS } from "eleventy-plugin-scad";
93+
94+
/** @param {import("@11ty/eleventy/UserConfig").default} eleventyConfig */
95+
export default async (eleventyConfig) => {
96+
addOpenSCADPlugin(eleventyConfig, {
97+
launchPath: "nightly", // this will find "/usr/bin/openscad-nightly" on my path
98+
});
99+
};
100+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eleventy-plugin-scad",
3-
"version": "0.4.1",
3+
"version": "0.5.1",
44
"description": "Eleventy plugin to treat SCAD files as templates that need rendering to STL and showcased",
55
"keywords": [
66
"eleventy",

0 commit comments

Comments
 (0)