Soft UI Design
Open-source starter built with Eleventy (11ty) and Prismic and Soft UI Design System.
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 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.
    1
    {
    2
    "Main": {
    3
    "title": {
    4
    "type": "StructuredText",
    5
    "config": {
    6
    "single": "heading1, heading2, heading3, heading4, heading5, heading6",
    7
    "label": "title",
    8
    "placeholder": "Title of the article"
    9
    }
    10
    },
    11
    "uid": {
    12
    "type": "UID",
    13
    "config": {
    14
    "label": "uid",
    15
    "placeholder": "ID of the article"
    16
    }
    17
    },
    18
    "date": {
    19
    "type": "Date",
    20
    "config": {
    21
    "label": "date",
    22
    "placeholder": "Created date of the article"
    23
    }
    24
    },
    25
    "article_image": {
    26
    "type": "Image",
    27
    "config": {
    28
    "constraint": {},
    29
    "thumbnails": [],
    30
    "label": "article_image"
    31
    }
    32
    },
    33
    "body": {
    34
    "type": "StructuredText",
    35
    "config": {
    36
    "multi": "paragraph,preformatted,heading1,heading2,heading3,heading4,heading5,heading6,strong,em,hyperlink,image,embed,list-item,o-list-item,rtl",
    37
    "allowTargetBlank": true,
    38
    "label": "Body of the Article",
    39
    "placeholder": "Article Body"
    40
    }
    41
    }
    42
    }
    43
    }
    44
    ​
    Copied!
    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.

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. 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

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:
    Go to your Prismic repository setting and under webhook add the Netlify webhook URL:

Codebase Structure

1
eleventy-soft-ui-design
2
β”œβ”€β”€ src/
3
β”‚ β”œβ”€β”€ assets/
4
β”‚ β”‚ β”œβ”€β”€ css/
5
β”‚ β”‚ β”œβ”€β”€ favicon/
6
β”‚ β”‚ β”œβ”€β”€ fonts/
7
β”‚ β”‚ β”œβ”€β”€ img/
8
β”‚ β”‚ β”œβ”€β”€ js/
9
β”‚ β”‚ β”œβ”€β”€ scripts/modules/app.js
10
β”‚ β”‚ └── scss/app.scss
11
β”‚ β”œβ”€β”€ data/
12
β”‚ β”‚ β”œβ”€β”€ app.json
13
β”‚ β”‚ β”œβ”€β”€ meta.json
14
β”‚ β”‚ └── prismicData.js
15
β”‚ β”œβ”€β”€ includes/
16
β”‚ β”œβ”€β”€ layouts/
17
β”‚ β”œβ”€β”€ pages/
18
β”‚ β”œβ”€β”€ sections/
19
β”‚ β”œβ”€β”€ 404.njk
20
β”‚ β”œβ”€β”€ feed.njk
21
β”‚ β”œβ”€β”€ index.njk
22
β”‚ β”œβ”€β”€ blog.njk
23
β”‚ β”œβ”€β”€ presentation.njk
24
β”‚ β”œβ”€β”€ robots.njk
25
β”‚ └── sitemap.njk
26
β”œβ”€β”€ utils/
27
β”œβ”€β”€ .eleventy.js
28
β”œβ”€β”€ .env.sample
29
β”œβ”€β”€ .gitignore
30
β”œβ”€β”€ .prettierrc
31
β”œβ”€β”€ netlify.toml
32
└── package.js
Copied!

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
Last modified 2mo ago