Use Identity by modifying the source code, or simply by using the predefined style and addding your own content.
Using prebuilt files
If you wish to quickly build a site without altering any variables such as colors, you can use the prebuilt CSS and JS files found in the
/dist directory. Simply load them into your HTML file and start adding components.
An example HTML file is already included in the
/dist folder, which provides a full example of Identity.
It contains the following lines to load all of the prebuilt styles:
You can adapt that HTML file with your own content and you may make use of Bootstrap components.
Building from source
Building from source allows you to change variables such as colors and other settings, and puts the power of the SASS CSS preprocessor at your disposal.
In order to run the tools that are used to compile the source code, you need NodeJS. Download and install NodeJS from here https://nodejs.org/en/download/. Make sure that you also install npm, NodeJS’s package manager.
To test if your installation has been successful, run the following commands:
If these return a version number, install the packages by running the following command in the root folder of your project, where
package.json can be found:
Starting the workflow
Various NPM scripts can be run to start certain processes. You may edit these scripts in the
package.json file to your liking. Gulp scripts can be found in
Initialize a development mode where files in
/src are watched and automatically processed upon changes. Additionally, a dev server is started with
npm run dev
Building your site
Process all files in
/src and build your site into the
npm run build
/dist folder using:
npm run clean