Skip to content

Commit

Permalink
Remove default config for additions, add to README and to blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Apr 19, 2017
1 parent 23ea0cf commit 05b88f3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
16 changes: 14 additions & 2 deletions README.md
Expand Up @@ -4,7 +4,7 @@

# Installation

Installing the Sitemap plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.
Installing the Sitemap plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

## GPM Installation (Preferred)

Expand All @@ -29,7 +29,7 @@ You should now have all the plugin files under

The `sitemap` plugin works out of the box. You can just go directly to `http://yoursite.com/sitemap` and you will see the generated `XML`.

# Config Defaults
## Config Defaults

```
enabled: true
Expand All @@ -52,3 +52,15 @@ sitemap:
If you want your sitemap to only be accessible via `sitemap.xml` for example, set the route to `/sitemap` and add this to your `.htaccess` file:

`Redirect 301 /sitemap /sitemap.xml`


## Manually add pages to the sitemap

You can manually add URLs to the sitemap using the Admin settings, or by adding entries to your `sitemap.yaml` with this format:

```
additions:
-
location: /not-a-grav-url
lastmod: '2017-04-06'
```
15 changes: 15 additions & 0 deletions blueprints.yaml
Expand Up @@ -41,3 +41,18 @@ form:
help: "URLs to ignore"
value_only: true
placeholder_value: /ignore-this-route

additions:
type: list
label: Additional URLs
help: "Add external URLs to the sitemap"

fields:
.location:
type: text
label: The URL location
placeholder: "/not-a-grav-url"
.lastmod:
type: text
label: "Last modification e.g. 2017-04-06"
placeholder: "2017-04-06"
9 changes: 0 additions & 9 deletions sitemap.yaml
Expand Up @@ -2,12 +2,3 @@ enabled: true
route: '/sitemap'
changefreq: daily
priority: !!float 1
ignores:
- /blog/blog-post-to-ignore
- /ignore-this-route
- /ignore-children-of-this-route/.*

additions:
-
location: /not-a-grav-url
lastmod: '2017-04-06'

1 comment on commit 05b88f3

@flaviocopes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(refs #35)

Please sign in to comment.