Creating a living style guide can streamline your web development process, ensuring that styles are consistent and well-documented. The **Style Guide Boilerplate** serves as a fantastic starting point. This guide will walk you through the setup and usage of this boilerplate, while also providing troubleshooting tips to help you along the way.
Download the Style Guide Boilerplate
If you haven’t already, you can clone, fork, or download the repo from GitHub. Once you have these files on your system, you’re ready to create a directory for them!
Set Up a Directory on Your Site
It’s a good practice to create a directory named style-guide in your site’s root directory. This is where you’ll upload the boilerplate files, keeping your project organized.
Upload the Style Guide Boilerplate Files
Since the **Style Guide Boilerplate** is based on PHP, ensure you have a server supporting PHP. Upload the files from the GitHub repository into the newly created style-guide directory.
Hook Up Your Own CSS Into the Style Guide
Within the head of the **Style Guide Boilerplate**, you’ll find custom styles designed for the boilerplate itself, prefixed with sg- to avoid conflicts. Below these boilerplate styles, add your own stylesheet(s) utilized on your live site:
<!-- Style Guide Boilerplate Styles -->
<link rel="stylesheet" href="css/sg-style.css">
<!-- Replace below stylesheet with your own stylesheet -->
<link rel="stylesheet" href="css/style.css">
Review Your Live Site CSS
Navigate to yoursite.com/style-guide to observe how your live site’s CSS affects base elements. This is where the magic happens, as you can visually track any adjustments.
Create Custom Patterns
To enhance your style guide, you can create custom patterns such as buttons or alert messages. Simply create a new HTML file and store your markup in the markup/patterns directory within your style guide folder:
Save as: pattern-name.html
You will be able to view the newly added patterns at yoursite.com/style-guide.
Create Personalized Documentation
To document your examples, you can use either markdown or HTML. Name the file according to your markup snippet file, such as:
markup-name.md or markup-name.html
Place this file in the docbase or doc/patterns directory, and it will become visible at yoursite.com/style-guide.
Running the App
To run the application, leverage PHP’s built-in web server using this command:
php -S localhost:8000
Then simply visit http://localhost:8000 to see your website live!
Generating Static HTML Style Guide
If you want a static version of your style guide, run the following command:
php index.php index.html
Browser Support
The **Style Guide Boilerplate** has been crafted with progressive enhancement, ensuring compatibility across an array of browsers:
- Chrome
- Firefox
- Safari
- Opera
- IE8+
- Safari for iOS
- Stock Android Browser (4.0+)
If you encounter bugs or issues, please open an issue on the GitHub repository. For real-time testing, you can utilize BrowserStack.
Troubleshooting
Here are some common troubleshooting tips:
- If your style guide is not displaying correctly, ensure that PHP is installed and properly configured on your server.
- Double-check the paths for your CSS and HTML files to ensure they are correct.
- If your styles aren’t applying, inspect the console for any potential errors or conflicts in the file paths.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Additional Resources
For further reading and inspiration, check out these resources:

