ThumbsmithThumbsmiththumbsmith
  • Documentation
  • Meta tags debugger
  • Preview your website
  • Pricing
Press shift + F to focus
Get started
IntroductionCreating a templateMustache cheatsheetUsing a template
Packages
@thumbsmith/cli@thumbsmith/url

Create a template

A Thumbsmith template is basically just a mustache-powered HTML/CSS file, with some optional metadata associated to it.

Example template file: example-template.thumbnail.html

---
name: example-template
description: Minimalistic template for demo purposes
default_props:
  title: Page title goes
  description: Page description comes here, lorem consectetur adipiscing elit. Maecenas nec imperdiet mi, et faucibus magna. Quisque faucibus condimentum nunc.
  company: Company
  logo: https://some-website.com/logo-dark.png
  color: '#0000ff'
---

<!-- Template -->
<div class="container">
  <p class="company">{{company}}</p>
  <h1>{{title}}</h1>
  <p>{{description}}</p>
  <img class="logo" src="{{{logo}}}" />
</div>

<!-- Styling -->
<style>
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html, body {
    width: 100%;
    height: 100%;
  }
  body {
    display: flex;
    justify-content: flex-start;
    font-family: sans-serif;
    background-color: {{{color}}};
    margin: 0;
  }
  .container {
    width: 100%;
    height: 100%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
</style>

There are two ways to create templates :

  • Use the integrated web GUI on your dashboard
  • Use the CLI + your favorite text editor

The metadata area demarcated by the --- characters (called front-matter) is only relevant is you're using the CLI. If you're using the website, you will have a nice UI to manage these fields.

Check out the mustache syntax cheatsheet for the template syntax.

Create a template with the web GUI

Follow the steps on the "Create template" page in the dashboard.

Create a template with CLI on npm

Checkout the @thumbsmith/cli docs.

More docs coming soon

On this page
Create a templateCreate a template with the web GUICreate a template with CLI on npm

Thumbsmith

HomeMeta tags debuggerProject roadmapDocumentationContact usAbout

Legal

Terms of ServicePrivacy policy

Follow us

@thumbsmithapp
© Copyright 2022, thumbsmith.com
validate-magic-link
×