Skip to content

weiji14/letsjustwander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P2P Blog

A blog to jot down wanderlusting thoughts with a heck of a mindset. Built using the Eleventy static site generator.

Directory structure (Jekyll inspired)

    letsjustwander/
    ├── _includes/ (contains reusable stuff like templates)
    │   ├── base.njk (the base layout for the blog)
    ├── _posts/ (contains individual blog posts written in markdown)
    │   ├── *.md (the stuff bloggers need to write!)
    │   ├── _posts.json (standard yaml front matter headers for all posts)
    ├── _site/ (hidden in git, contains static pre-generated html files)
    │   ├── name-of-a-post
    │   │   ├── index.html (pre-generated blog post)
    │   ├──index.html (pre-generated main page)
    │   ├──about.html (pre-generated about page)
    ├── .<something>ignore (files ignored by a particular piece of software)
    ├──README.md (the markdown file you're reading now)
    ├──about.md (the markdown file that will become the about page)
    ├──dat.json (useful for people wanting to share this repo via p2p dat protocol)
    └──index.md (the markdown file that will become the front page of the blog)

Getting Started

How to replicate a static blog like this for the technical minded! Also, optional steps for those wanting to go the p2p way.

Install 11ty static site generator and Vercel for static hosting

npm install -g @11ty/eleventy
npm install -g vercel

Build html files with eleventy

# Change directory into the blog folder
cd letsjustwander
# Use eleventy to build from `.` directory to `_site`
npx @11ty/eleventy

Deploy into the web with Vercel

# Deploy static html files in the `_site` folder
npx vercel deploy _site
# Cleanup old Vercel instances (if any)
npx vercel ls
npx vercel rm _site
# Point the `https://site-<abcdefgh>.now.sh` instance to `https://letsjustwander.now.sh`
npx vercel alias https://<abcdefgh>.vercel.app letsjustwander.vercel.app

(Optional) Deploy into the p2p world with Dat/Beaker Browser

Inspired by this. Note that this may require some expertise to work, rough guidelines below.

# Use either dat-cli or beaker browser

# Publish using [dat](https://docs.datproject.org/publish) (**hard**)
npm install -g dat
cd letsjustwander
dat create
dat share

# [Publish using beaker-browser](https://beakerbrowser.com/docs/tutorials/create-a-blog.html) (**easy**, but not recommended)
# Download browser from https://beakerbrowser.com/install/ and install
# Open browser, open new tab, click on 'New +', and then 'Import from folder'

The result should be a dat://... url that links to your files, accessible using dat/beakerbrowser. If you're good, you should have a dat.json file in the folder, otherwise just modify the one in this repo.

Note that you'll need to keep your computer running to sync the files with the dat world. Alternatively, use hashbase to host your files for you with a pretty url like yourwebsite.hashbase.io

About

A blog to jot down wanderlusting thoughts with a heck of a mindset. Built using the Eleventy static site generator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published