danmarshall / jscad-gallery

🎲⚽🗿 Create a gallery of OpenJSCAD 3D designs
https://danmarshall.github.io/jscad-gallery
MIT License
18 stars 11 forks source link

jscad-gallery

A collection of OpenJSCAD 3D designs

https://danmarshall.github.io/jscad-gallery

This project uses Jekyll to create a web site that you can host on GitHub pages.

Setup

  1. Fork this repo.
  2. On your fork's GitHub page, go to Settings.
  3. On the Settings page, scroll to the GitHub Pages section, and enable it on your master branch.
  4. In about one minute, visit https://your-github-username.github.io/jscad-gallery/ to see your personal jsad-gallery.

Run the site locally

  1. Install Jekyll
  2. Clone your fork on your local machine.
  3. cd to your jscad-gallery clone's folder
  4. npm install
  5. jekyll serve
  6. See your local site on http://localhost:4000

To add your design to the local site:

If your design is a Node module

  1. Install your package:

    npm install your-package-name

    or, if you aren't published to NPM:

    npm install your-git-remote-url

  2. Generate your design files:

    npm run build-design your-package-name

If your design is a .jscad file

Finalizing your design preview

After invoking either type of command above, a temporary local web page will appear. Follow the instructions to create a thumbnail image and post metadata. You may need to close all browser tabs to complete the process.

This will create 4 files that enable your jscad design on the site:

Refresh your http://localhost:4000 to see your design on the site.

To add your design to the GitHub pages site:

  1. Stage your local changes:

    git add .

  2. Commit your local changes:

    git commit -m "added your-package-name"

  3. Push to your remote fork:

    git push

In about a minute, your design will be live on your site at https://your-github-username.github.io/jscad-gallery/