---
description: >-
  Open-source starter built with Eleventy (11ty) and Prismic and Soft UI Design
  System.
---

# Soft UI Design

Eleventy Soft is an Eleventy adaptation of Soft UI Design System (a user-friendly and beautiful design system based on Bootstrap 5), including a Blog system that uses Prismic CMS for content management.

Soft UI Design System is built with over 70 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining. All components can take variations in color, which you can easily modify using SASS files and classes.

You will save a lot of time going from prototyping to full-functional code because all elements are implemented. This Freebie Bootstrap 5 UI Kit is coming with prebuilt design blocks, so the development process is seamless, switching from our pages to the real website is very easy to be done.

### Quick Start

This project uses includes a Blog system that uses Prismic CMS. You'll need a free [prismic.io](http://prismic.io/) account.

### Setup Prismic CMS

* In your Prismic account, create a new repository.
* In your repository, create a repeatable custom type called Blog Posts with API ID "blogposts".
*   To configure the content model for Blog Posts, paste this code in the JSON editor of the Blog Posts content type.

    ```
    {
      "Main": {
        "title": {
          "type": "StructuredText",
          "config": {
            "single": "heading1, heading2, heading3, heading4, heading5, heading6",
            "label": "title",
            "placeholder": "Title of the article"
          }
        },
        "uid": {
          "type": "UID",
          "config": {
            "label": "uid",
            "placeholder": "ID of the article"
          }
        },
        "date": {
          "type": "Date",
          "config": {
            "label": "date",
            "placeholder": "Created date of the article"
          }
        },
        "article_image": {
          "type": "Image",
          "config": {
            "constraint": {},
            "thumbnails": [],
            "label": "article_image"
          }
        },
        "body": {
          "type": "StructuredText",
          "config": {
            "multi": "paragraph,preformatted,heading1,heading2,heading3,heading4,heading5,heading6,strong,em,hyperlink,image,embed,list-item,o-list-item,rtl",
            "allowTargetBlank": true,
            "label": "Body of the Article",
            "placeholder": "Article Body"
          }
        }
      }
    }
    ```
* Add a bunch of content to the Blog Post. This is the data 11ty will use to build your site blog.
* Find your API endpoint in your repository settings, you will need it when you're setting up your local project and Netlify deploy.

![](https://4080083720-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYVW6MKCi9iujNc3SK_%2F-MgbIA7MlVogPyYXzlY-%2F-MgfQnXLkvm0SErf-IFb%2Fget-prismic-repo-url.png?alt=media\&token=afb879bd-31e1-4541-9c5e-a4aa51ebee16)

### Local Development

* After setting up Prismic CMS, Generate a new repo from this repository template which will copy this project into your own new repo.
* Open the terminal, Clone your new repository with `git clone <https://github.com/YOUR_REPO`>,
* Navigate to the newly created repo and, and run "npm install" to install all dependencies.
* Rename the ".env.sample" file (located in the root directory) to ".env" and edit the file to add your Prismic repository API endpoint.
* Run "npm run start" to start a development server or "npm run build" to build your site.

### Deploy to Netlify

* Upload the local repository you set up to Github.
* Go to [https://app.netlify.com](https://app.netlify.com/). Once you’ve logged in, click the 'New site from Git' button and choose the forked repository you just created.
* Follow the prompts, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete.
* When you get to deploy & build settings, you need to add your Prismic repository API endpoint as an environmental variable named PRISMIC\_REPOSITORY\_NAME

![](https://4080083720-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYVW6MKCi9iujNc3SK_%2F-MgbIA7MlVogPyYXzlY-%2F-MgfResdC1skEPohL3zn%2Fnetlify-env-setup-1.png?alt=media\&token=edcabc36-aef3-4ded-b7c8-e20d9247fca7)

![](https://4080083720-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYVW6MKCi9iujNc3SK_%2F-MgbIA7MlVogPyYXzlY-%2F-MgfRjcKYQRFiXsO15Z8%2Fnetlify-env-setup-2.png?alt=media\&token=fd3b275b-a2af-4cca-a6dd-1ddd37c88f80)

### Set up a Netlify build hook and a Prismic webhook to trigger Netlify Build

We need to set up a webhook so that when you save a Prismic document, this triggers a Netlify build.

* Go to your Netlify site settings and add a webhook under Build & deploy, you'll get a URL that triggers the webhook:

![](https://4080083720-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYVW6MKCi9iujNc3SK_%2F-MgfSkEdGMNEhnwPoKNT%2F-MgfUTitNQvrX-_Qcv0T%2Fnetlify-build-hooks-1.png?alt=media\&token=94a6c54e-3653-48c1-9e20-ce5923ce036b)

* Go to your Prismic repository setting and under webhook add the Netlify webhook URL:

![](https://4080083720-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYVW6MKCi9iujNc3SK_%2F-MgfSkEdGMNEhnwPoKNT%2F-MgfUYRk-G0drOYPBOFt%2Fnetlify-build-hooks-2.png?alt=media\&token=6577853d-d0a7-405d-8605-31912694e723)

### Codebase Structure

```
eleventy-soft-ui-design
    ├── src/
    │ ├── assets/
    │ │ ├── css/
    │ │ ├── favicon/
    │ │ ├── fonts/
    │ │ ├── img/
    │ │ ├── js/
    │ │ ├── scripts/modules/app.js
    │ │ └── scss/app.scss
    │ ├── data/
    │ │ ├── app.json
    │ │ ├── meta.json
    │ │ └── prismicData.js
    │ ├── includes/
    │ ├── layouts/
    │ ├── pages/
    │ ├── sections/
    │ ├── 404.njk
    │ ├── feed.njk
    │ ├── index.njk
    │ ├── blog.njk
    │ ├── presentation.njk
    │ ├── robots.njk
    │ └── sitemap.njk
        ├── utils/
    ├── .eleventy.js
    ├── .env.sample
    ├── .gitignore
    ├── .prettierrc
    ├──  netlify.toml
    └──  package.js
```

### Customization

**CSS**

Styling can be written in Sass. The main index file is in `src/static/assets/styles/main.scss`. Import any SCSS code you want in there; it will be processed and optimized. The output is in `dist/static/assets/styles/main.css`

**JS**

Javascript can be written in ES6 syntax. The main index file is in `src/static/assets/scripts/main.js`. It will be transpiled to ES5 with babel, bundled together with webpack, and minified in production. The output is in `dist/static/assets/scripts/main.js`

**Global Data Files**

You can update the global data like title, meta description of the site at `src/data/meta.json`
