Push Jekyll site files into a subdirectory to avoid confusing them with actual dots script files

This commit is contained in:
Danielle McLean 2020-06-18 12:00:16 +10:00
parent b9d9939c7f
commit 0207b7da11
Signed by: 00dani
GPG key ID: 9DDE1EDE01E3A605
12 changed files with 5 additions and 9 deletions

1
site/.dots/README.md Symbolic link
View file

@ -0,0 +1 @@
../../README.md

1
site/.dots/local Symbolic link
View file

@ -0,0 +1 @@
../../local

27
site/Gemfile Normal file
View file

@ -0,0 +1,27 @@
source "https://rubygems.org"
ruby RUBY_VERSION
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "4.1.0"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima"
# Syntax highlighter!
gem "rouge"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
#gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-github-metadata", "~> 1.0"
# end

80
site/Gemfile.lock Normal file
View file

@ -0,0 +1,80 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.13.1)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
jekyll (4.1.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-feed (0.13.0)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.2.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.5)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.20.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
jekyll (= 4.1.0)
minima
rouge
RUBY VERSION
ruby 2.7.1p83
BUNDLED WITH
2.1.2

7
site/README.html Normal file
View file

@ -0,0 +1,7 @@
---
layout: page
permalink: /README
---
{% capture readme_text %}{% include_relative .dots/README.md %}{% endcapture %}
{% assign readme_text = (readme_text | newline_to_br | split: "<br />" | shift | shift | join: '' ) %}
{{ readme_text | markdownify }}

13
site/_config.yml Normal file
View file

@ -0,0 +1,13 @@
title: 00dani/dot-dots
email: dani@00dani.me
description: "Bootstrap and simple management script for 00dani's dotfiles"
twitter_username: 00d4n1
github_username: 00dani
url: 'https://dots.00dani.me'
# Build settings
theme: minima
highlighter: rouge
exclude:
- vendor
- Gemfile*

20
site/_includes/head.html Normal file
View file

@ -0,0 +1,20 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
{% assign full_base_url = '' %}
{% if jekyll.environment == 'production' %}
{% assign full_base_url = site.url | append: site.baseurl %}
{% endif %}
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: full_base_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: full_base_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | prepend: full_base_url }}">
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>

28
site/_scripts/partial-dl-test Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env zsh
actualSize=$(wc -c < $1)
testDir=$TMPDIR/dots-partial-dl-test-$UID-$$
if [[ -d $testDir ]]; then
echo "$testDir exists, is this test already running?" >&2
echo "Refusing to launch. Remove $testDir manually if necessary." >&2
exit -1
fi
repeat-char() {
local char=$1
local -i count=$2
(( count )) && printf "$char%.0s" {1..$count}
}
for (( size = 0; size < actualSize - 1; size++ )); do
percent=$(( size * 100 / actualSize ))
progress=$(( percent / 10 ))
printf " [%-10s] [%${#actualSize}d/%d]\r" "$(repeat-char = $progress)" $size $actualSize >&2
head -c$size $1 | env -i HOME=$testDir zsh 2>/dev/null
if [[ -d $testDir ]]; then
rm -rf $testDir
printf "\ndots still ran with only %d bytes available, %d%% of its full %d bytes!\n" $size $percent $actualSize >&2
exit $size
fi
done

39
site/css/main.scss Normal file
View file

@ -0,0 +1,39 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
// Our variables
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Minima also includes a mixin for defining media queries.
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
// Import partials from the `minima` theme.
@import "minima";

4
site/index.html Normal file
View file

@ -0,0 +1,4 @@
---
---
{% include_relative .dots/local/bin/dots %}
# <style>body { white-space: pre-wrap; font-family: Monoid, Inconsolata, "Ubuntu Mono", Consolas, Menlo, monospace; } a { font-size: 1.3em; }</style>

View file

@ -0,0 +1,7 @@
---
layout: page
permalink: /partial-dl-test
---
{% highlight zsh %}
{% include_relative _scripts/partial-dl-test %}
{% endhighlight %}