GitXplorerGitXplorer
p

www

public
6 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
6c9a3527070eed9ac8216041e3285b7e065227f1

Add CNAME

ppickfire committed 4 years ago
Unverified
18dd66fbad30ae674bfc06c6de679fafe8646ee9

Add default tor.css for github

ppickfire committed 5 years ago
Unverified
9a564ed52cdfa834cc95bd57358aba0d5fe03da0

Remove TODO

ppickfire committed 5 years ago
Unverified
7d0cbeeff9e9561cc059c5fab350f344121e7c20

Remove extra cv directory

ppickfire committed 5 years ago
Unverified
2690edea4b481563ba5c1e153de8a71b0b7aa867

Add CV as soft link

ppickfire committed 5 years ago
Unverified
c5fef7b440fc5858aff47cf6e1a8a89510731c65

Remove pickfire.tk links

ppickfire committed 5 years ago

README

The README file for this repository.

SSSG - Stupid Static Site Generator

SSSG is a layout-based static site generator built for parallelism and minimalism while being flexible and feature-full. Think of it as a layer of glue, which glues layers of papers into 3D models. It's perfect for simple personal sites that adheres to the KISS Principle while being able to follow the Suckless Philosophy and get rid of Dependency Hell.

Why SSSG?

It gives you the choice to be in control of your own site. But in return, you need to give it love and time like a wise man once spoken: “先苦后甜”.

        Usage: make -j4 (or any number you like)

+--------------------+    +--------------------+    +--------------------+
|    _lay/main.sh    |    |    _lay/post.sh    |    |  post/_www/config  |
+--------------------+    +--------------------+    +--------------------+
|exit                |    |LAYOUT=_lay/main.dh+|    |LAYOUT=_lay/post.dh+|
+---------+----------+    |F=$FILE             |    |DATE=$(date $FILE)  |
          |               +---------+----------+    |T=$(head -n $FILE)  |
+---------+----------+              |               +---------+----------+
|   _lay/main.dhtml  |    +---------+----------+              |
+--------------------+    |   _lay/post.dhtml  |    +---------+----------+
|<!DOCTYPE html>     |    +--------------------+    |    post/test.md    |
|<html>              |    |${F}                |    +--------------------+
|  <head>            |    |====                |    |Why?                |
|    <title>${T}</ti+|    |                    |    |----                |
|  <head>            |    |${CONTENT}      <------  |- Parallel and fast |
|  <body>            |    |                    |    |- Markdown-powered  |
|    ${CONTENT}  <------  |---                 |    |- Minimal outputs   |
|    ...             |    |Created by ${DATE}  |    |- Flexiblility++    |
+--------------------+    +--------------------+    +------------------- +
                                                              ^
              --- rm -rf $(TARG)/*                            |
  +----------/                                                |
  |  clean   |        _bin/html.sh post/test.md > $(TARG)/post/test.html
  +==========+-----+ /
  | Makefile | all + ---- _bin/html.sh index.html > $(TARG)/index.html
  +==========+-----+ \
             |        +------ _bin/atom.sh post/ > $(TARG)/%/atom.xml
             |         \
             |          -------- gzip -9 (needed) + cp (needed)
      +------+--+
      |  check  | validate html/css/xml online -> ./check.sh $(TARG)
      +---------+

The installation is simple, just make this your site:

git clone git://github.com/pickfire/www --depth 1
rm -rf www/.git

Configurations can be done by editing config.sh and config.mk.

_dyn/tor needs to be manually linked to /srv/tor which uses fastcgi.

Rule

  1. The _www/config found at the previous/current directory of the input file will be sourced, shell script and variables are optional.

  2. Add shell functions/variables to file.sh (just change extension), these can aid in generating dynamic contents. E.g. menu

  3. In between those lines of code, add LAYOUT=_lay/layout.dhtml to paste the current content into layout.dhtml's ${CONTENT}. (Required)

  4. Use ${VAR} (must be UPPERCASE) in files to substitute it to the variable, unused variables (line) will be deleted when generation is completed.

  5. Makefile does not look for directories with names starting with _.

Need

Tool

  • atom.sh - Find Markdown files and generate an Atom feed from it
  • check.sh - Find HTML/CSS/XML files and verify it online
  • css.sh - Minify CSS files with sed and tr
  • html.sh - Output HTML content with a file as input
  • map.sh - Generate the sitemap and urllist

Help

Inspiration

Alternative

Implementation