- Copy-paste to split book into separate chapter files
- Fix inline spans broken by a space after a word before the closing
*
- Remove image width and height inherited from images in docx
- Wrap all images in an Electric Book figure blockquote
- Simplify indentation in lists by reducing space after list marker to one space
- Remove non-kramdown markdown
^
around superscripts after numbers - Wrap the opening words of a paragraph in a span
- Find an email address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# That tells Linux to use a Bourne shell interpreter. | |
# Run this script from the current directory. (Required on OSX.) | |
cd -- "$(dirname "$0")" | |
# Don't echo these commands. | |
set +v | |
# Get the filename from the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $apiPrefix := "https://api.airtable.com/v0/"}} | |
{{ $key := getenv "AIRTABLE_KEY" }} | |
{{ if isset .Site.Params "view" }} | |
{{ .Scratch.Set "view" (printf "&view=%s" .Site.Params.view) }} | |
{{ else }} | |
{{ .Scratch.Set "view" "" }} | |
{{ end }} | |
{{ if isset .Site.Params "speakers_view" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (event, context, callback) => { | |
let name | |
if (event.pathParameters && event.pathParameters.name) { | |
name = event.pathParameters.name | |
} | |
/* generate the hello paragraph */ | |
const helloParagraph = greetPerson(name) | |
// callback is sending HTML back |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- $.Scratch.Add "index" slice -}} | |
{{$index := where .Site.RegularPages ".Section" "not in" (slice "links" "internal") }} | |
{{- range $index -}} | |
{{ with .Params.images }} | |
{{ $.Scratch.Set "image" (index . 0)}} | |
{{ else }} | |
{{ $.Scratch.Set "image" "/uploads/logo.jpg"}} | |
{{ end }} | |
{{ $image := printf "%s%s" (replace ($.Scratch.Get "image") "/uploads" .Site.Params.image_url) "?fit=crop&h=201&w=358" }} | |
{{- $content_filtered := replaceRE "(?m)(?i)(?s:\\ba\\b|\\band\\b|\\barchival\\b|\\bagain\\b|\\bin\\b|\\bto\\b|\\bis\\b|\\bno\\b|\\bor\\b|\\bthis\\b|\\bwell\\b|\\byes\\b|\\bthe\\b|\\bthere\\b|\\bthese\\b|\\bthen\\b)" "" (delimit .PlainWords " ") -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const UglifyJSPlugin = require("uglifyjs-webpack-plugin"); | |
const CleanWebpackPlugin = require("clean-webpack-plugin"); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const PurgecssPlugin = require("purgecss-webpack-plugin"); | |
const glob = require("glob-all"); | |
const webpack = require("webpack"); | |
//let toProvide = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- image --> | |
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}> | |
{{ with .Get "link"}}<a href="{{.}}">{{ end }} | |
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}" {{ end }}{{ with .Get "width" }}width="{{.}}" {{ end }} class="lazyload" /> | |
<noscript> | |
<img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}" {{ end }}{{ with .Get "width" }}width="{{.}}" {{ end }}/> | |
</noscript> | |
{{ if .Get "link"}}</a>{{ end }} | |
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} | |
<figcaption>{{ if isset .Params "title" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* Set header classes (e.g. colors scheme) at either the global, section, or page level */}} | |
{{/* Initially set $.Param "headerClasses" at the page or global (config) level, with a default if neither exist */}} | |
{{ $headerClasses := $.Param "headerClasses" | default "bg-near-black silver"}} | |
{{/* To set at the section level, get the section the current page belongs to */}} | |
{{ $section := .Site.GetPage "section" .Section }} | |
{{/* If the page belongs to a section, */}} | |
{{ if $section}} | |
{{/* get the section's headerClasses param value, defaulting to the global/page level. */}} | |
{{ $headerClasses := $section.Param "headerClasses" | default $headerClasses }} | |
{{/* Set the colors based on the page's setting, but if there isn't one, look to the section's settings above */}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4:15:17 PM: Build started | |
4:16:31 PM: Fetching cached dependencies | |
4:16:32 PM: No cached dependencies found. Cloning fresh repo | |
4:16:32 PM: git clone [email protected]:budparr/gohugo.io | |
4:16:33 PM: git remote rm origin | |
4:16:33 PM: Preparing Git Reference refs/heads/master | |
4:16:35 PM: Building site | |
4:16:35 PM: Running build command | |
4:16:36 PM: v6.10.0 is already installed. | |
4:16:37 PM: Now using node v6.10.0 (npm v3.10.10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ if eq (getenv "HUGO_ENV") "production" }} | |
<!-- production stuff here --> | |
{{ end }} |
NewerOlder