A comprehensive traffic safety education website built with Jekyll, featuring interactive quizzes, educational safety tips, and modern responsive design.
- Multiple Choice Questions: Carefully crafted questions covering all aspects of traffic safety
- Instant Feedback: Immediate results with detailed explanations for each answer
- Visual Progress: Progress indicators within each quiz session
- Difficulty Levels: Quizzes ranging from basic to advanced topics
- Retake Capability: Users can retake quizzes to reinforce learning
- Educational Articles: In-depth guides on defensive driving, weather safety, and road signs
- Practical Tips: Real-world advice that drivers can immediately apply
- Regular Updates: Fresh content covering the latest in traffic safety
- Easy Navigation: Well-organized topics and search functionality
- Responsive Layout: Optimized for desktop, tablet, and mobile devices
- Professional UI: Clean, modern design with intuitive navigation
- Accessibility: Built with web accessibility standards in mind
- Fast Loading: Optimized performance for quick loading times
- Ruby 3.0 or higher
- Bundler gem
- Git
-
Clone the repository
git clone https://github.com/yourusername/traffic-quiz.git cd traffic-quiz -
Install dependencies
bundle install
-
Run the development server
bundle exec jekyll serve -
Open your browser Visit
http://localhost:4000to see the site
bundle exec jekyll buildThe built site will be in the _site directory.
traffic-quiz/
βββ _config.yml # Jekyll configuration
βββ _layouts/ # Page layouts
β βββ default.html # Main site layout
β βββ post.html # Blog post layout
β βββ quiz.html # Quiz layout
βββ _posts/ # Blog posts
βββ _quizzes/ # Quiz content
βββ assets/
β βββ css/
β β βββ main.css # Main stylesheet
β βββ js/
β βββ main.js # JavaScript functionality
βββ pages/
β βββ about.md # About page
β βββ blog.md # Blog listing
β βββ quizzes.md # Quiz listing
βββ index.md # Homepage
- Create a new file in
_quizzes/directory - Use the following front matter format:
---
layout: quiz
title: "Your Quiz Title"
description: "Brief description of the quiz"
difficulty: easy # easy, medium, hard
questions:
- question: "Your question text"
options:
- "Option A"
- "Option B"
- "Option C"
- "Option D"
correct: 0 # Index of correct answer (0-3)
explanation: "Explanation of why this answer is correct"
---- Create a new file in
_posts/directory with format:YYYY-MM-DD-title.md - Use the following front matter:
---
layout: post
title: "Your Article Title"
date: YYYY-MM-DD
author: "Author Name"
reading_time: 5
icon: "π"
tags: ["tag1", "tag2"]
excerpt: "Brief description of the article"
---Feel free to fork the repo and submit a PR with improvements, new quizzes, or blog articles!
Made with β€οΈ using Jekyll, HTML, CSS, and JavaScript.
Stay safe on the roads! π¦