https://github.com/askmike/mijnrealiteit-photoblog
the code behind mijnrealiteit.nl
https://github.com/askmike/mijnrealiteit-photoblog
Last synced: 2 months ago
JSON representation
the code behind mijnrealiteit.nl
- Host: GitHub
- URL: https://github.com/askmike/mijnrealiteit-photoblog
- Owner: askmike
- Created: 2016-10-03T19:52:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-10-05T03:43:57.000Z (9 months ago)
- Last Synced: 2025-10-05T05:37:06.250Z (9 months ago)
- Language: JavaScript
- Size: 641 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Mijnrealiteit Photoblog
This is the code behind my photoblog [mijnrealiteit](https://mijnrealiteit.nl).
## How It Works
The photoblog uses a simple static site generator to generate the blog (with RSS feed) and optimize all images for web.
### Directory Structure
```
/raw_articles/
/my-post/
- index.md # Markdown content with front matter
- image1.jpg # High-resolution images
- image2.jpg
/build/ # Final built website, generated by build.js
```
### Article Format
Each article is a directory with an `index.md` file:
```markdown
---
title: My Post Title
date: 2023-12-01
---
Here's my article content with **markdown** support.

```
## Setup and Usage
### 1. Install Dependencies
```bash
npm install
```
### 2. Build the Site
```bash
npm run build
```
This processes all markdown files and generates a complete static website in the `build/` directory.
### 3. Preview Locally
```bash
# Install http-server globally
npm install -g http-server
# Serve the build directory
http-server build
```
### 4. Deploy
```bash
./up.sh
```
This runs the full pipeline: build (image processing, website rendering) → deploy.
## Image Processing
The system automatically processes images:
- High-resolution images from `raw_articles/` are resized and optimized in a few different variants (of different dimensions and web image formats)
- Images wider than 2200px are automatically resized
## File Structure
- `raw_articles/` - Source markdown files and high-res images
- `build/` - Final built website
- `build.js` - Main build script
- `static/` - Static folder for website assets
## Adding New Articles
1. Create a new directory in `raw_articles/`
2. Add `index.md` with front matter (title, date)
3. Add your images
4. Run `npm run build` to rebuild
5. Run `http-server build` to preview locally
## Configuration
Edit the `config` object in `build.js` to change:
- Site URL
- Site name
## License
The MIT License (MIT)
Copyright (c) 2014 Mike van Rossum
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.