Updating README.md

This commit is contained in:
Alex Yatskov 2019-04-08 17:50:19 -07:00
parent b84dbb7155
commit 6073c8f8b6

View File

@ -11,7 +11,7 @@ Goldsmith does not use any configuration files, and all behavior customization h
through it. Although the [Goldsmith](https://godoc.org/github.com/FooSoft/goldsmith) is short and (hopefully) easy to through it. Although the [Goldsmith](https://godoc.org/github.com/FooSoft/goldsmith) is short and (hopefully) easy to
understand, it is often best to learn by example: understand, it is often best to learn by example:
* Start by copying files from a source directory to a destination directory (the simplest possible use case): 1. Start by copying files from a source directory to a destination directory (the simplest possible use case):
```go ```go
goldsmith. goldsmith.
@ -19,7 +19,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* Now let's convert any Markdown files to HTML fragments (while still copying the rest), using the 2. Now let's convert any Markdown files to HTML fragments (while still copying the rest), using the
[Markdown](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/markdown) plugin: [Markdown](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/markdown) plugin:
```go ```go
@ -29,7 +29,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* If we have any 3. If we have any
[front matter](https://raw.githubusercontent.com/FooSoft/goldsmith-samples/master/basic/content/index.md) in our [front matter](https://raw.githubusercontent.com/FooSoft/goldsmith-samples/master/basic/content/index.md) in our
Markdown files, we need to extract it using the, Markdown files, we need to extract it using the,
[FrontMatter](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter) plugin: [FrontMatter](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter) plugin:
@ -42,7 +42,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* Next, we should run our barebones HTML through a 4. Next, we should run our barebones HTML through a
[template](https://raw.githubusercontent.com/FooSoft/goldsmith-samples/master/basic/content/layouts/basic.gohtml) to [template](https://raw.githubusercontent.com/FooSoft/goldsmith-samples/master/basic/content/layouts/basic.gohtml) to
add elements like a header, footer, or a menu; for this we can use the add elements like a header, footer, or a menu; for this we can use the
[Layout](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter) plugin: [Layout](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter) plugin:
@ -56,7 +56,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* Now, let's [minify](https://en.wikipedia.org/wiki/Minification_(programming)) our files to reduce data transfer and 5. Now, let's [minify](https://en.wikipedia.org/wiki/Minification_(programming)) our files to reduce data transfer and
load times for our site's visitors using the load times for our site's visitors using the
[Minify](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/minify) plugin: [Minify](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/minify) plugin:
@ -70,7 +70,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* Debugging problems in minified code can be tricky, so let's use the 6. Debugging problems in minified code can be tricky, so let's use the
[Condition](https://godoc.org/github.com/FooSoft/goldsmith-components/filters/condition) filter to make minification [Condition](https://godoc.org/github.com/FooSoft/goldsmith-components/filters/condition) filter to make minification
occur only when we are ready for distribution. occur only when we are ready for distribution.
@ -86,7 +86,7 @@ understand, it is often best to learn by example:
End(dstDir) // write files to dstDir End(dstDir) // write files to dstDir
``` ```
* Now that we have all of our plugins chained up, let's look at a complete example which uses 7. Now that we have all of our plugins chained up, let's look at a complete example which uses
[DevServer](https://godoc.org/github.com/FooSoft/goldsmith-components/devserver) to bootstrap a complete development [DevServer](https://godoc.org/github.com/FooSoft/goldsmith-components/devserver) to bootstrap a complete development
sever which automatically rebuilds the site whenever source files are updated. sever which automatically rebuilds the site whenever source files are updated.
@ -143,6 +143,8 @@ Below are some examples of Goldsmith usage which can used to base your site on:
sample site from the tutorial. sample site from the tutorial.
* [Bootstrap Sample](https://github.com/FooSoft/goldsmith-samples/tree/master/bootstrap): a slightly more advanced * [Bootstrap Sample](https://github.com/FooSoft/goldsmith-samples/tree/master/bootstrap): a slightly more advanced
sample using [Bootstrap](https://getbootstrap.com/). sample using [Bootstrap](https://getbootstrap.com/).
* [FooSoft Productions](https://foosoft.net): I have been "dogfooding" Goldsmith by using it to build my homepage for
years.
## Components ## ## Components ##
@ -155,7 +157,7 @@ A growing set of plugins, filters, and other tools are provided to make it easie
* [Breadcrumbs](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/breadcrumbs): Generate metadata * [Breadcrumbs](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/breadcrumbs): Generate metadata
required to build breadcrumb navigation. required to build breadcrumb navigation.
* [Collection](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/collection): Group related pages * [Collection](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/collection): Group related pages
into named collections. into named collections.
* [Document](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/document): Enable simple DOM * [Document](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/document): Enable simple DOM
modification via an API similar to jQuery. modification via an API similar to jQuery.
* [FrontMatter](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter): Extract the * [FrontMatter](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/frontmatter): Extract the
@ -176,7 +178,7 @@ A growing set of plugins, filters, and other tools are provided to make it easie
metadata from HTML files. metadata from HTML files.
* [Syntax](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/syntax): Enable syntax highlighting for * [Syntax](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/syntax): Enable syntax highlighting for
pre-formatted code blocks. pre-formatted code blocks.
* [Tags](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/tags): Generate tag clouds and indices * [Tags](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/tags): Generate tag clouds and indices
from file metadata. from file metadata.
* [Thumbnail](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/thumbnail): Build thumbnails for a * [Thumbnail](https://godoc.org/github.com/FooSoft/goldsmith-components/plugins/thumbnail): Build thumbnails for a
variety of common image formats. variety of common image formats.