diff --git a/Readme.md b/Readme.md index 5ba8492..d881fbe 100644 --- a/Readme.md +++ b/Readme.md @@ -103,7 +103,7 @@ Execution, trying TDD for the first time: - [ ] Generate JSON feed - - [ ] Munge HTML files to make them available without an extension (index.html hack, do it in the SiteGenerator) + - [x] Munge HTML files to make them available without an extension (index.html hack, do it in the SiteGenerator) - [ ] Inline CSS? diff --git a/bin/compile b/bin/compile index acbb2d5..59bb329 100755 --- a/bin/compile +++ b/bin/compile @@ -10,23 +10,16 @@ TARGET_DIR="$2" function main() { rm -rf "$TARGET_DIR" - echo "* generate site from $SOURCE_DIR into $TARGET_DIR" - "$THIS_DIR/sitegen" "$SOURCE_DIR" "$TARGET_DIR" - # echo "* compile rss feed" # compile_feeds - # echo "* harp compile $SOURCE_DIR $TARGET_DIR" - # rm -rf "$TARGET_DIR/*" "$TARGET_DIR/.*" - # "$HARP" compile "$SOURCE_DIR" "$TARGET_DIR" + echo "* generate site from $SOURCE_DIR into $TARGET_DIR" + "$THIS_DIR/sitegen" "$SOURCE_DIR" "$TARGET_DIR" # clean up temporary feeds # rm $SOURCE_DIR/public/feed.xml # rm $SOURCE_DIR/public/feed.json - # echo "* munge html files to make them available without an extension" - # munge_html - # echo "* inline CSS" # ruby -w $THIS_DIR/inline-css "$TARGET_DIR" @@ -38,25 +31,6 @@ function compile_feeds() { ruby -w $THIS_DIR/feeds $SOURCE_DIR/public } -function munge_html() { - for FILE in "$TARGET_DIR"/*.html "$TARGET_DIR"/posts/*/*/*.html "$TARGET_DIR"/posts/drafts/*.html "$TARGET_DIR"/projects/*.html; do - FILENAME="${FILE##*/}" - case "$FILENAME" in - index.html) - continue - ;; - missing.html) - continue - ;; - esac - - # make posts available without an .html extension - FILE_DIR="${FILE%.html}" - mkdir -p "$FILE_DIR" - mv "$FILE" "$FILE_DIR/index.html" - done -} - # function minify_js() { # for FILE in "$TARGET_DIR"/js/*.js; do # $THIS_DIR/minify-js.sh "$FILE" > /tmp/minified.js && mv /tmp/minified.js "$FILE" || echo "* failed to minify $FILE"