Add Gemfile, Update Makefile
This commit is contained in:
parent
7d03407d8b
commit
082e863908
5
Gemfile
Normal file
5
Gemfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "org-ruby", "~> 0.9.12"
|
||||||
|
gem "RedCloth", "~> 4.3"
|
17
Gemfile.lock
Normal file
17
Gemfile.lock
Normal file
@ -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
|
4
Makefile
4
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: list-doc list-sass list-rest list-dir
|
||||||
list-doc:
|
list-doc:
|
||||||
@echo "====DOCUMENT FILES===="
|
@echo "====DOCUMENT FILES===="
|
||||||
@ -16,5 +16,7 @@ clean:
|
|||||||
rm -rf out
|
rm -rf out
|
||||||
build:
|
build:
|
||||||
./render.sh
|
./render.sh
|
||||||
|
./gensimap.sh
|
||||||
|
out: build
|
||||||
push: build
|
push: build
|
||||||
rclone sync -v out/ neo:/
|
rclone sync -v out/ neo:/
|
||||||
|
@ -13,7 +13,7 @@ You will need the following tools to render and upload the site
|
|||||||
- [org-ruby](http://github.com/bdewey/org-ruby)
|
- [org-ruby](http://github.com/bdewey/org-ruby)
|
||||||
- [comrak](https://github.com/kivikakk/comrak)
|
- [comrak](https://github.com/kivikakk/comrak)
|
||||||
## `Makefile`
|
## `Makefile`
|
||||||
Wraps `render.sh` as well as either `neo` or `rclone`.
|
Wraps `render.sh` for the most part.
|
||||||
### Makefile Options
|
### Makefile Options
|
||||||
#### `list`
|
#### `list`
|
||||||
Lists all components in a heading-annotated 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.
|
Lists markup files, sass files, directories, and other files respectively.
|
||||||
#### `clean`
|
#### `clean`
|
||||||
Removes the `out/` directory that is generated on running of `render.sh`.
|
Removes the `out/` directory that is generated on running of `render.sh`.
|
||||||
#### `push`
|
|
||||||
Uploads the site to neocities.org.
|
|
||||||
## `render.sh`
|
## `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/`
|
The primary worker script, sets up the directory structure, transpiles the markup, then the Sass, then copies the contents of `in/` to `out/`
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# gensimap.sh: Generate a sitemap for my website.
|
# gensimap.sh: Generate a sitemap for my website.
|
||||||
# v2.0p1
|
# v2.0p1
|
||||||
|
function inf { 1>&2 echo -e "\x1B[1;32mINF\x1B[0m: $*"; }
|
||||||
function r { echo $@ >> out/sitemap.xml; }
|
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 '<?xml version="1.0" encoding="UTF-8"?>'
|
r '<?xml version="1.0" encoding="UTF-8"?>'
|
||||||
r '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
|
r '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'
|
||||||
for i in `find in -type f -name '*.html'`; do
|
for i in `find in -type f -name '*.html'`; do
|
||||||
|
27
in/doc.md
27
in/doc.md
@ -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/`
|
|
@ -72,7 +72,6 @@ function other {
|
|||||||
cp -rv 'in'/* out/
|
cp -rv 'in'/* out/
|
||||||
}
|
}
|
||||||
function sitemap {
|
function sitemap {
|
||||||
inf "Generating Sitemap..."
|
|
||||||
./gensimap.sh
|
./gensimap.sh
|
||||||
}
|
}
|
||||||
function all {
|
function all {
|
||||||
@ -81,7 +80,6 @@ function all {
|
|||||||
docs
|
docs
|
||||||
sass
|
sass
|
||||||
other
|
other
|
||||||
sitemap
|
|
||||||
}
|
}
|
||||||
function info {
|
function info {
|
||||||
load_title
|
load_title
|
||||||
|
Loading…
x
Reference in New Issue
Block a user