mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
dea71670c0
Before this commit, you would have to use page bundles to do image processing etc. in Hugo. This commit adds * A new `/assets` top-level project or theme dir (configurable via `assetDir`) * A new template func, `resources.Get` which can be used to "get a resource" that can be further processed. This means that you can now do this in your templates (or shortcodes): ```bash {{ $sunset := (resources.Get "images/sunset.jpg").Fill "300x200" }} ``` This also adds a new `extended` build tag that enables powerful SCSS/SASS support with source maps. To compile this from source, you will also need a C compiler installed: ``` HUGO_BUILD_TAGS=extended mage install ``` Note that you can use output of the SCSS processing later in a non-SCSSS-enabled Hugo. The `SCSS` processor is a _Resource transformation step_ and it can be chained with the many others in a pipeline: ```bash {{ $css := resources.Get "styles.scss" | resources.ToCSS | resources.PostCSS | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen"> ``` The transformation funcs above have aliases, so it can be shortened to: ```bash {{ $css := resources.Get "styles.scss" | toCSS | postCSS | minify | fingerprint }} <link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen"> ``` A quick tip would be to avoid the fingerprinting part, and possibly also the not-superfast `postCSS` when you're doing development, as it allows Hugo to be smarter about the rebuilding. Documentation will follow, but have a look at the demo repo in https://github.com/bep/hugo-sass-test New functions to create `Resource` objects: * `resources.Get` (see above) * `resources.FromString`: Create a Resource from a string. New `Resource` transformation funcs: * `resources.ToCSS`: Compile `SCSS` or `SASS` into `CSS`. * `resources.PostCSS`: Process your CSS with PostCSS. Config file support (project or theme or passed as an option). * `resources.Minify`: Currently supports `css`, `js`, `json`, `html`, `svg`, `xml`. * `resources.Fingerprint`: Creates a fingerprinted version of the given Resource with Subresource Integrity.. * `resources.Concat`: Concatenates a list of Resource objects. Think of this as a poor man's bundler. * `resources.ExecuteAsTemplate`: Parses and executes the given Resource and data context (e.g. .Site) as a Go template. Fixes #4381 Fixes #4903 Fixes #4858
500 lines
11 KiB
TOML
500 lines
11 KiB
TOML
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
|
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/BurntSushi/locker"
|
|
packages = ["."]
|
|
revision = "a6e239ea1c69bff1cfdb20c4b73dadf52f784b6a"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/BurntSushi/toml"
|
|
packages = ["."]
|
|
revision = "a368813c5e648fee92e5f6c30e3944ff9d5e8895"
|
|
|
|
[[projects]]
|
|
name = "github.com/PuerkitoBio/purell"
|
|
packages = ["."]
|
|
revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/PuerkitoBio/urlesc"
|
|
packages = ["."]
|
|
revision = "de5bf2ad457846296e2031421a34e2568e304e35"
|
|
|
|
[[projects]]
|
|
name = "github.com/alecthomas/chroma"
|
|
packages = [
|
|
".",
|
|
"formatters",
|
|
"formatters/html",
|
|
"lexers",
|
|
"lexers/a",
|
|
"lexers/b",
|
|
"lexers/c",
|
|
"lexers/circular",
|
|
"lexers/d",
|
|
"lexers/e",
|
|
"lexers/f",
|
|
"lexers/g",
|
|
"lexers/h",
|
|
"lexers/i",
|
|
"lexers/internal",
|
|
"lexers/j",
|
|
"lexers/k",
|
|
"lexers/l",
|
|
"lexers/m",
|
|
"lexers/n",
|
|
"lexers/o",
|
|
"lexers/p",
|
|
"lexers/q",
|
|
"lexers/r",
|
|
"lexers/s",
|
|
"lexers/t",
|
|
"lexers/v",
|
|
"lexers/w",
|
|
"lexers/x",
|
|
"lexers/y",
|
|
"styles"
|
|
]
|
|
revision = "1b755a90bd109f170385cb3964f0abdfd3451145"
|
|
|
|
[[projects]]
|
|
name = "github.com/bep/debounce"
|
|
packages = ["."]
|
|
revision = "844797fa1dd9ba969d71b62797ff19d1e49d4eac"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/bep/gitmap"
|
|
packages = ["."]
|
|
revision = "012701e8669671499fc43e9792335a1dcbfe2afb"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/bep/go-tocss"
|
|
packages = [
|
|
"scss",
|
|
"scss/libsass",
|
|
"tocss"
|
|
]
|
|
revision = "2abb118dc8688b6c7df44e12f4152c2bded9b19c"
|
|
|
|
[[projects]]
|
|
name = "github.com/chaseadamsio/goorgeous"
|
|
packages = ["."]
|
|
revision = "dcf1ef873b8987bf12596fe6951c48347986eb2f"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/cpuguy83/go-md2man"
|
|
packages = ["md2man"]
|
|
revision = "a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa"
|
|
version = "v1.0.6"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/danwakefield/fnmatch"
|
|
packages = ["."]
|
|
revision = "cbb64ac3d964b81592e64f957ad53df015803288"
|
|
|
|
[[projects]]
|
|
name = "github.com/davecgh/go-spew"
|
|
packages = ["spew"]
|
|
revision = "346938d642f2ec3594ed81d874461961cd0faa76"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/disintegration/imaging"
|
|
packages = ["."]
|
|
revision = "dd50a3ee9985ccd313a2f03c398fcaedc96dc707"
|
|
version = "v1.2.4"
|
|
|
|
[[projects]]
|
|
name = "github.com/dlclark/regexp2"
|
|
packages = [
|
|
".",
|
|
"syntax"
|
|
]
|
|
revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957"
|
|
version = "v1.1.6"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/dsnet/golib"
|
|
packages = ["memfile"]
|
|
revision = "1ea1667757804fdcccc5a1810e09aba618885ac2"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/eknkc/amber"
|
|
packages = [
|
|
".",
|
|
"parser"
|
|
]
|
|
revision = "cdade1c073850f4ffc70a829e31235ea6892853b"
|
|
|
|
[[projects]]
|
|
name = "github.com/fortytw2/leaktest"
|
|
packages = ["."]
|
|
revision = "a5ef70473c97b71626b9abeda80ee92ba2a7de9e"
|
|
version = "v1.2.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/fsnotify/fsnotify"
|
|
packages = ["."]
|
|
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
|
|
version = "v1.4.7"
|
|
|
|
[[projects]]
|
|
name = "github.com/gobwas/glob"
|
|
packages = [
|
|
".",
|
|
"compiler",
|
|
"match",
|
|
"syntax",
|
|
"syntax/ast",
|
|
"syntax/lexer",
|
|
"util/runes",
|
|
"util/strings"
|
|
]
|
|
revision = "5ccd90ef52e1e632236f7326478d4faa74f99438"
|
|
version = "v0.2.3"
|
|
|
|
[[projects]]
|
|
name = "github.com/gorilla/websocket"
|
|
packages = ["."]
|
|
revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b"
|
|
version = "v1.2.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/hashicorp/go-immutable-radix"
|
|
packages = ["."]
|
|
revision = "7f3cd4390caab3250a57f30efdb2a65dd7649ecf"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/hashicorp/golang-lru"
|
|
packages = ["simplelru"]
|
|
revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/hashicorp/hcl"
|
|
packages = [
|
|
".",
|
|
"hcl/ast",
|
|
"hcl/parser",
|
|
"hcl/printer",
|
|
"hcl/scanner",
|
|
"hcl/strconv",
|
|
"hcl/token",
|
|
"json/parser",
|
|
"json/scanner",
|
|
"json/token"
|
|
]
|
|
revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"
|
|
|
|
[[projects]]
|
|
name = "github.com/inconshreveable/mousetrap"
|
|
packages = ["."]
|
|
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
|
|
version = "v1.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/jdkato/prose"
|
|
packages = [
|
|
"internal/util",
|
|
"transform"
|
|
]
|
|
revision = "20d3663d4bc9dd10d75abcde9d92e04b4861c674"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/kyokomi/emoji"
|
|
packages = ["."]
|
|
revision = "7e06b236c489543f53868841f188a294e3383eab"
|
|
version = "v1.5"
|
|
|
|
[[projects]]
|
|
name = "github.com/magefile/mage"
|
|
packages = [
|
|
"mg",
|
|
"sh"
|
|
]
|
|
revision = "2f974307b636f59c13b88704cf350a4772fef271"
|
|
version = "v1.0.2"
|
|
|
|
[[projects]]
|
|
name = "github.com/magiconair/properties"
|
|
packages = ["."]
|
|
revision = "c3beff4c2358b44d0493c7dda585e7db7ff28ae6"
|
|
version = "v1.7.6"
|
|
|
|
[[projects]]
|
|
name = "github.com/markbates/inflect"
|
|
packages = ["."]
|
|
revision = "a12c3aec81a6a938bf584a4bac567afed9256586"
|
|
|
|
[[projects]]
|
|
name = "github.com/mattn/go-runewidth"
|
|
packages = ["."]
|
|
revision = "9e777a8366cce605130a531d2cd6363d07ad7317"
|
|
version = "v0.0.2"
|
|
|
|
[[projects]]
|
|
name = "github.com/miekg/mmark"
|
|
packages = ["."]
|
|
revision = "fd2f6c1403b37925bd7fe13af05853b8ae58ee5f"
|
|
version = "v1.3.6"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/mitchellh/hashstructure"
|
|
packages = ["."]
|
|
revision = "2bca23e0e452137f789efbc8610126fd8b94f73b"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/mitchellh/mapstructure"
|
|
packages = ["."]
|
|
revision = "00c29f56e2386353d58c599509e8dc3801b0d716"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/muesli/smartcrop"
|
|
packages = [
|
|
".",
|
|
"options"
|
|
]
|
|
revision = "f6ebaa786a12a0fdb2d7c6dee72808e68c296464"
|
|
|
|
[[projects]]
|
|
name = "github.com/nicksnyder/go-i18n"
|
|
packages = [
|
|
"i18n/bundle",
|
|
"i18n/language",
|
|
"i18n/translation"
|
|
]
|
|
revision = "0dc1626d56435e9d605a29875701721c54bc9bbd"
|
|
version = "v1.10.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/olekukonko/tablewriter"
|
|
packages = ["."]
|
|
revision = "b8a9be070da40449e501c3c4730a889e42d87a9e"
|
|
|
|
[[projects]]
|
|
name = "github.com/pelletier/go-toml"
|
|
packages = ["."]
|
|
revision = "acdc4509485b587f5e675510c4f2c63e90ff68a8"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/pmezard/go-difflib"
|
|
packages = ["difflib"]
|
|
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
|
|
version = "v1.0.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/russross/blackfriday"
|
|
packages = ["."]
|
|
revision = "11635eb403ff09dbc3a6b5a007ab5ab09151c229"
|
|
|
|
[[projects]]
|
|
name = "github.com/sanity-io/litter"
|
|
packages = ["."]
|
|
revision = "ae543b7ba8fd6af63e4976198f146e1348ae53c1"
|
|
version = "v1.1.0"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/shurcooL/sanitized_anchor_name"
|
|
packages = ["."]
|
|
revision = "86672fcb3f950f35f2e675df2240550f2a50762f"
|
|
|
|
[[projects]]
|
|
name = "github.com/spf13/afero"
|
|
packages = [
|
|
".",
|
|
"mem"
|
|
]
|
|
revision = "787d034dfe70e44075ccc060d346146ef53270ad"
|
|
version = "v1.1.1"
|
|
|
|
[[projects]]
|
|
name = "github.com/spf13/cast"
|
|
packages = ["."]
|
|
revision = "8965335b8c7107321228e3e3702cab9832751bac"
|
|
version = "v1.2.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/spf13/cobra"
|
|
packages = [
|
|
".",
|
|
"doc"
|
|
]
|
|
revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4"
|
|
version = "v0.0.2"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/spf13/fsync"
|
|
packages = ["."]
|
|
revision = "12a01e648f05a938100a26858d2d59a120307a18"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/spf13/jwalterweatherman"
|
|
packages = ["."]
|
|
revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/spf13/nitro"
|
|
packages = ["."]
|
|
revision = "24d7ef30a12da0bdc5e2eb370a79c659ddccf0e8"
|
|
|
|
[[projects]]
|
|
name = "github.com/spf13/pflag"
|
|
packages = ["."]
|
|
revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66"
|
|
version = "v1.0.0"
|
|
|
|
[[projects]]
|
|
name = "github.com/spf13/viper"
|
|
packages = ["."]
|
|
revision = "b5e8006cbee93ec955a89ab31e0e3ce3204f3736"
|
|
version = "v1.0.2"
|
|
|
|
[[projects]]
|
|
name = "github.com/stretchr/testify"
|
|
packages = [
|
|
"assert",
|
|
"require"
|
|
]
|
|
revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71"
|
|
version = "v1.2.1"
|
|
|
|
[[projects]]
|
|
name = "github.com/tdewolff/minify"
|
|
packages = [
|
|
".",
|
|
"css",
|
|
"html",
|
|
"js",
|
|
"json",
|
|
"svg",
|
|
"xml"
|
|
]
|
|
revision = "8d72a4127ae33b755e95bffede9b92e396267ce2"
|
|
version = "v2.3.5"
|
|
|
|
[[projects]]
|
|
name = "github.com/tdewolff/parse"
|
|
packages = [
|
|
".",
|
|
"buffer",
|
|
"css",
|
|
"html",
|
|
"js",
|
|
"json",
|
|
"strconv",
|
|
"svg",
|
|
"xml"
|
|
]
|
|
revision = "d739d6fccb0971177e06352fea02d3552625efb1"
|
|
version = "v2.3.3"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "github.com/wellington/go-libsass"
|
|
packages = ["libs"]
|
|
revision = "615eaa47ef794d037c1906a0eb7bf85375a5decf"
|
|
|
|
[[projects]]
|
|
name = "github.com/yosssi/ace"
|
|
packages = ["."]
|
|
revision = "ea038f4770b6746c3f8f84f14fa60d9fe1205b56"
|
|
version = "v0.0.5"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "golang.org/x/image"
|
|
packages = [
|
|
"bmp",
|
|
"draw",
|
|
"math/f64",
|
|
"riff",
|
|
"tiff",
|
|
"tiff/lzw",
|
|
"vp8",
|
|
"vp8l",
|
|
"webp"
|
|
]
|
|
revision = "f315e440302883054d0c2bd85486878cb4f8572c"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "golang.org/x/net"
|
|
packages = [
|
|
"context",
|
|
"idna"
|
|
]
|
|
revision = "61147c48b25b599e5b561d2e9c4f3e1ef489ca41"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "golang.org/x/sync"
|
|
packages = ["errgroup"]
|
|
revision = "1d60e4601c6fd243af51cc01ddf169918a5407ca"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "golang.org/x/sys"
|
|
packages = ["unix"]
|
|
revision = "3b87a42e500a6dc65dae1a55d0b641295971163e"
|
|
|
|
[[projects]]
|
|
branch = "master"
|
|
name = "golang.org/x/text"
|
|
packages = [
|
|
"collate",
|
|
"collate/build",
|
|
"internal/colltab",
|
|
"internal/gen",
|
|
"internal/language",
|
|
"internal/language/compact",
|
|
"internal/tag",
|
|
"internal/triegen",
|
|
"internal/ucd",
|
|
"language",
|
|
"secure/bidirule",
|
|
"transform",
|
|
"unicode/bidi",
|
|
"unicode/cldr",
|
|
"unicode/norm",
|
|
"unicode/rangetable",
|
|
"width"
|
|
]
|
|
revision = "2cb43934f0eece38629746959acc633cba083fe4"
|
|
|
|
[[projects]]
|
|
name = "gopkg.in/yaml.v2"
|
|
packages = ["."]
|
|
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
|
|
version = "v2.2.1"
|
|
|
|
[solve-meta]
|
|
analyzer-name = "dep"
|
|
analyzer-version = 1
|
|
inputs-digest = "aaf909f54ae33c5a70f692e19e59834106bcbbe5d16724ff3998907734e32c0b"
|
|
solver-name = "gps-cdcl"
|
|
solver-version = 1
|