Go to file
2024-09-18 18:52:42 -04:00
markdown fix format 2024-09-18 18:52:42 -04:00
public/css css 2024-09-16 13:48:33 -04:00
views Make latest posts show first, fix special chars in URL and add new article 2024-09-18 18:46:51 -04:00
.gitignore first commit 2024-09-16 07:53:26 -04:00
app.js Make latest posts show first, fix special chars in URL and add new article 2024-09-18 18:46:51 -04:00
package.json add rss feed 2024-09-16 14:28:18 -04:00
README.md first commit 2024-09-16 07:53:26 -04:00

Here is a README.md file for your project:

# Raven Scott Blog Website

This repository contains the code for Raven Scott's blog website, where markdown files serve as blog posts, and visitors can browse through posts, learn more about Raven, and contact him directly.

## Project Structure

```bash
raven-scott-website
├── app.js                    # Main server-side logic using Express.js
├── markdown                  # Folder containing markdown files for blog posts
│   └── API Caching for Minecraft Servers.md
├── package-lock.json          # Auto-generated package lock file
├── package.json               # Dependencies and project metadata
├── public                     # Static files such as CSS, images
│   └── css
│       └── styles.css         # Custom styles for the website
└── views                      # EJS template files for rendering HTML
    ├── about.ejs              # 'About Me' page template
    ├── blog-post.ejs          # Blog post page template
    ├── contact.ejs            # Contact form page template
    └── index.ejs              # Homepage displaying recent blog posts

Features

  • Markdown Blog Posts: Blog posts are written in Markdown, located in the markdown folder. The content is rendered with marked and supports code syntax highlighting using highlight.js.
  • Dynamic Blog Post Display: Each markdown file is dynamically converted into a blog post with a readable URL slug. The homepage shows the latest posts, and each post has its own dedicated page.
  • Contact Form: Visitors can use the contact form to send inquiries directly. Messages are handled via nodemailer.
  • Responsive Design: The website uses Bootstrap to ensure a clean and responsive layout across devices.
  • Professional Look and Feel: The custom CSS in styles.css provides a dark theme with accent colors for a professional, modern look.

Installation

  1. Clone the repository:

    git clone git@git.ssh.surf:snxraven/ravenscott-blog.git
    cd raven-scott-website
    
  2. Install the dependencies:

    npm install
    
  3. Create a .env file to set up environment variables (e.g., for the email service using nodemailer):

    touch .env
    

    Add the following:

    PORT=3000
    
  4. Run the project:

    npm start
    

    The server will run on http://localhost:3000.

Project Details

  • Template Engine: EJS is used to render dynamic HTML views.
  • Markdown Parsing: Blog posts are stored in the markdown folder, and the app converts them to HTML using marked.
  • Code Highlighting: Any code snippets in the markdown files are automatically highlighted with highlight.js.
  • Routing:
    • /: Displays the homepage with the latest blog posts.
    • /about: About Me page where Raven shares his passions and interests.
    • /contact: Contact page where visitors can submit inquiries.
    • /blog/:slug: Dynamically generated blog post pages based on the markdown file.