Skip to content

BAmaya666/journal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Journal Blog - EJS Exercise

A simple journal blog built using EJS (Embedded JavaScript) templating to practice dynamic content rendering, partials, and server-side rendering with Node.js.

📋 Project Overview

This project demonstrates how to create a multi-page journal blog using EJS templates. Each page is built with .ejs files and styled with minimal CSS to focus on the EJS functionality.

🚀 Features

  • About Page - Information about the blog
  • Blog/Journal Pages - Individual entry pages
  • Contact Page - Simple contact form layout
  • Partial Templates - Reusable header, footer, and navigation components

🛠️ Technologies Used

  • Backend: Node.js with Express.js
  • Templating: EJS (Embedded JavaScript)
  • Styling: CSS3
  • Structure: HTML5 with EJS syntax

🎯 EJS Features Demonstrated

  • Template Inheritance - Using layout files
  • Partials - Reusable header, footer, and navigation
  • Data Passing - Dynamic content from server to templates
  • Conditionals - Showing/hiding elements based on data
  • Loops - Iterating through journal entries
  • Includes - Embedding partial templates

📝 Usage

Creating New Journal Entries

Add new entries by modifying the data object in app.js or create a separate JSON file to store your journal data.

Customizing Styles

Edit the CSS in public/css/style.css to change the appearance of your blog.

Adding New Pages
  1. Create a new .ejs file in the views/pages/ directory
  2. Add a corresponding route in app.js

📚 Learning Objectives

  • Understand EJS syntax and templating
  • Practice creating dynamic web pages
  • Learn to use partials for reusable components
  • Implement server-side rendering with Express
  • Structure a multi-page application

🤝 Contributing

Feel free to fork this project and submit pull requests for any improvements!

About

Exercise to play with JavaScript' ejs templating creating a blog with different pages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors