Skip to content

Commit

Permalink
- update README to reflect changes to config and sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
horuskol committed Aug 10, 2023
1 parent 1884dd7 commit 08bb2e0
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ Caxton looks for a `.env` file in your project's root directory. The following v

You can create different environment configurations, for example `.env.prod`.

Caxton will also look for additional configuration in `caxton.json`. The various options are covered in the relevant sections below.
The default environment when building is `dev`.

Caxton will also look for additional configuration in `caxton.json` and `caxton.{environment}.json`.
The various options are covered in the relevant sections below.

### Building with Caxton

Expand All @@ -39,6 +42,8 @@ To build for specific environment:
vendor/bin/caxton -e prod
```

The default environment is `dev`, so any configuration targeting the `dev` environment will be used.

## Assets (styles, scripts and images)

Common assets should be placed in your public directory. These will be copied to the build directory before your templates are built into HTML.
Expand Down Expand Up @@ -79,23 +84,32 @@ It will then copy any asset files from the `content` directory, as well as build

Files and directories that begin with a `.` or `_` will not be ignored.

### Block/allow list
### Include/exclude list

You can specify blocked and allowed filenames in the `caxton.json` configuration file. File paths are relative to the working directory.
You can specify files for inclusion or exclusion in the `caxton.json` configuration file. File paths are relative to the working directory.

```
{
"files": {
"allow": [
"include": [
"public/_redirects"
],
"block": [
"exclude": [
"content/never-include-this-file"
],
}
}
```

### Sitemap

Caxton will generate a `sitemap.xml` and add it to the root of your output directory.
Only HTML files will be included, and the last modified time will be calculated based on the source/template file.

## Publishing

Caxton simply builds a directory of content that can be published. How you publish your content is up to you.

## Why is this package called Caxton?

William Caxton is thought to be the person who introduced the printing press to England, and so ushered in a great advance in the production of books and dispersal of knowledge.

0 comments on commit 08bb2e0

Please sign in to comment.