diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | guide-src/development/index.html | 7 | ||||
-rw-r--r-- | guide-src/make.py | 2 | ||||
-rw-r--r-- | index.html | 3 | ||||
-rw-r--r-- | pugl.js | 2 |
6 files changed, 17 insertions, 4 deletions
@@ -3,3 +3,4 @@ scratch *~ node_modules guide +public @@ -1,2 +1,8 @@ +public-target: guide-target + rm -rf public + mkdir public + cp -r guide public + cp index.html style.css pugl.js move.svg x.svg favicon.ico public/ + guide-target: python3 guide-src/make.py diff --git a/guide-src/development/index.html b/guide-src/development/index.html index 717ff6d..c9a75d2 100644 --- a/guide-src/development/index.html +++ b/guide-src/development/index.html @@ -18,10 +18,15 @@ the main files of interest are <code>index.html</code> and <code>pugl.js</code>, the JavaScript for pugl (hopefully it doesn't become too unmanageable to have just one file). </p> +<p> +you can run <code>make</code> to generate a <code>public/</code> directory which has just the files +that should be hosted. +</p> + <h3>contributing to the guide</h3> <p> the guide is automatically generated from the files in <code>guide-src/</code> by <code>guide-src/make.py</code> (you can also just run <code>make</code> to generate it), which is a simple script whose main purpose is adding -a sidebar to all of the guide pages. any PNG files are automatically copied from <code>guide-src/</code> to <code>guide/</code>. +a sidebar to all of the guide pages. any PNG/JPG/SVG files are automatically copied from <code>guide-src/</code> to <code>guide/</code>. when you add or remove pages from the guide, you'll need to edit <code>guide-src/outline.txt</code>. </p> diff --git a/guide-src/make.py b/guide-src/make.py index 6f03513..69a0fd1 100644 --- a/guide-src/make.py +++ b/guide-src/make.py @@ -10,7 +10,7 @@ os.makedirs(OUTPUT_DIR, exist_ok=True) try: for f in os.listdir(INPUT_DIR): - if f.endswith('.png'): + if f.endswith('.png') or f.endswith('.svg') or f.endswith('.jpg') or f.endswith('.jpeg'): shutil.copyfile(INPUT_DIR + '/' + f, OUTPUT_DIR + '/' + f) elif not '.' in f: os.makedirs(OUTPUT_DIR + '/' + f, exist_ok=True) @@ -77,7 +77,8 @@ </div> <div id="error">error</div> <dialog id="about-dialog"> - <h2>about pugl</h2> + <h2>pugl</h2> + <i><b>p</b>ommicket's <b>u</b>tility for <b>gl</b> shaders</i> <hr> <p> pugl is a tool that lets you create & share shaders without writing any code. @@ -2,7 +2,7 @@ /* TODO: -- guide +- multiple creations */ const APP_ID = 'dh3YgVZQdX1Q'; |