~tendigits/shelp

Static site helper scripts and structure

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~tendigits/shelp
read/write
git@git.sr.ht:~tendigits/shelp

You can also use your local clone with git send-email.

#Shelp

This is a starting point for a static site. Included in /src are 3 helper bash scripts. The whole thing is intentionally minimal, and you are expected to write content in text files using HTML. Shelp just has the following features:

  • a structure for maintaining a folder full of pages for a site
  • a way to keep repetitive parts in their own maintainable files (/src/inc)
  • an image processor to save source images down for web
  • an auto-generated index list page
  • incredibly fast builds because it does so little

#Dependencies

#Typical workflow

Run topic script, answer prompts. Open generated files and modify. Add image to /src/img. Run image script. Run build script. Preview results and upload to server (or just sync w/ git).

Screenshot of starter site

#src/topic.sh

This script will prompt you with questions and scaffold the folder and files for a topic into src/content. The text files generated are data sources, see "Topic folders" below for formatting.

cd src
./topic.sh

#src/img.sh

This script will look for source images in src/img and process for web output into assets/img

cd src
./img.sh

#src/build.sh

This script will generate topic pages into the site folder based on whats found in src/content

cd src
./build.sh

#Topic folders

When you create a topic, it's folder will contain several supporting text files. All files should have an empty line at the end. Here's how each type works:

#content.htm

[primary page content in html] (required, file is auto-created)

#meta.htm

[meta tags in html] which will go into page head (required, but auto-generated)

#related.txt

will auto-generate links to related pages in the sidebar. Format (no spaces):

[topic]
[topic]
[topic]

#notes.txt

list of notes that will show up in the sidebar. Format:

[plain text note]
[plain text note]
[plain text note]

#Homepage

The homepage is maintained on it's own at the root at /index.html. The scripts won't build this file.

#/src/inc

The in-between parts of every page (except the homepage) are stored in separate files here. The build script grabs content from these files as it assembles each page. Modify universal stuff like the site nav here.

#Make it your own

Update /main.css and the files in /src/inc/ and give it your own look and feel. You can also add more types of sidebar blocks pretty easily in the /src/topic.sh script too.