diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..31df01c --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true +source "https://rubygems.org" + +gem "org-ruby", "~> 0.9.12" +gem "RedCloth", "~> 4.3" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..8e2f991 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,17 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.3.2) + org-ruby (0.9.12) + rubypants (~> 0.2) + rubypants (0.7.1) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + RedCloth (~> 4.3) + org-ruby (~> 0.9.12) + +BUNDLED WITH + 2.4.1 diff --git a/Makefile b/Makefile index a38b41b..e3c839a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all list-doc list-sass list-rest list-dir list clean build push +.PHONY: all list-doc list-sass list-rest list-dir list clean push list: list-doc list-sass list-rest list-dir list-doc: @echo "====DOCUMENT FILES====" @@ -16,5 +16,7 @@ clean: rm -rf out build: ./render.sh + ./gensimap.sh +out: build push: build rclone sync -v out/ neo:/ diff --git a/README.md b/README.md index a834b57..442a893 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You will need the following tools to render and upload the site - [org-ruby](http://github.com/bdewey/org-ruby) - [comrak](https://github.com/kivikakk/comrak) ## `Makefile` -Wraps `render.sh` as well as either `neo` or `rclone`. +Wraps `render.sh` for the most part. ### Makefile Options #### `list` Lists all components in a heading-annotated list @@ -21,7 +21,5 @@ Lists all components in a heading-annotated list Lists markup files, sass files, directories, and other files respectively. #### `clean` Removes the `out/` directory that is generated on running of `render.sh`. -#### `push` -Uploads the site to neocities.org. ## `render.sh` The primary worker script, sets up the directory structure, transpiles the markup, then the Sass, then copies the contents of `in/` to `out/` diff --git a/gensimap.sh b/gensimap.sh index eaa8add..f23437a 100755 --- a/gensimap.sh +++ b/gensimap.sh @@ -1,8 +1,13 @@ #!/bin/bash # gensimap.sh: Generate a sitemap for my website. # v2.0p1 +function inf { 1>&2 echo -e "\x1B[1;32mINF\x1B[0m: $*"; } function r { echo $@ >> out/sitemap.xml; } -test -d out/sitemap.xml && sed -i d sitemap.xml +inf "Generating Sitemap..." +if test -f out/sitemap.xml; then + inf "Overwriting current sitemap..." + sed -i d sitemap.xml +fi r '' r '' for i in `find in -type f -name '*.html'`; do diff --git a/in/doc.md b/in/doc.md deleted file mode 100644 index a834b57..0000000 --- a/in/doc.md +++ /dev/null @@ -1,27 +0,0 @@ -# Atlas48's Neocites Archives -Welcome to the technical documentation for my [Neocities](https://neocities.org) page, which also contains a rudimentary static site generator cobbled together out of unix tools -and Ruby scripts - -# License -All markup is licensed under the Creative Commons [Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. -Any runnable computer code or Sass/CSS definitions are licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.html) -# Specification -## Dependencies -You will need the following tools to render and upload the site -- [Neocities CLI](https://neocities.org/cli) -- [RedCloth](http://redcloth.org/) -- [org-ruby](http://github.com/bdewey/org-ruby) -- [comrak](https://github.com/kivikakk/comrak) -## `Makefile` -Wraps `render.sh` as well as either `neo` or `rclone`. -### Makefile Options -#### `list` -Lists all components in a heading-annotated list -#### `list-{doc,sass,dir,rest}` -Lists markup files, sass files, directories, and other files respectively. -#### `clean` -Removes the `out/` directory that is generated on running of `render.sh`. -#### `push` -Uploads the site to neocities.org. -## `render.sh` -The primary worker script, sets up the directory structure, transpiles the markup, then the Sass, then copies the contents of `in/` to `out/` diff --git a/in/doc.md b/in/doc.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/in/doc.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/render.sh b/render.sh index a7aca23..b102ff7 100755 --- a/render.sh +++ b/render.sh @@ -72,7 +72,6 @@ function other { cp -rv 'in'/* out/ } function sitemap { - inf "Generating Sitemap..." ./gensimap.sh } function all { @@ -81,7 +80,6 @@ function all { docs sass other - sitemap } function info { load_title