Shape Books Sample Project
When you're just getting started you can create a project using a project template. For this example we'll use the Shape Books template. Here's a preview of what the shape books site looks like.
You can follow along with the video, or jump straight in.
git clone https://github.com/takeshape/takeshape-samples.git && cd takeshape-samples/shape-books
npm install- This will install all dependencies
npx tsg init- Follow the command prompts to set up your local environment to communicate with TS
npm start- The server runs on http://localhost:5000 by default
- Have fun playing around with the sample site! Change some markup a template file and the site will regenerate automatically. Try adding a new field to an existing content type then add it to the corresponding GraphQL query and template.
Deploying your templates
When you are done tinkering and are ready to put your site online follow these steps:
Configure a Static Site in the TakeShape webapp.
- Open your project in TakeShape
- Click on "Static Sites" from the project dropdown menu.
- Click the "NEW STATIC SITE" button.
- Give your site a name such as "Production" or "Staging"
- Select your "Provider" and enter in the appropriate credentials.
Use the CLI to point your local development folder to the static site you just created.
npx tsg init- Follow the command prompts
Use the CLI to deploy your templates!
npx tsg deploy- Deploy your site to TS!
Once the templates are deployed TakeShape will generate HTML and push your website to the configured provider
- Check your bucket/webserver to see the fruits of your labor
- Additional publishes can be triggered using the "Deploy " in the project menu
All sample projects are available as a github repo - https://github.com/takeshape/takeshape-samples