Git Product home page Git Product logo

bridgetown-sitemap's Introduction

Bridgetown Sitemap Generator Plugin

Tests Gem Version

Bridgetown plugin to silently generate a sitemaps.org compliant sitemap for your Bridgetown site

Usage

  1. Install the plugin with the following command:
bundle add bridgetown-sitemap -g bridgetown_plugins
  1. Add the following to your site's bridgetown.config.yml:
url: "https://example.com" # the base hostname & protocol for your site

This plugin only supports Bridgetown sites that use the resource content engine.

This can be configured by adding the following line to your site's bridgetown.config.yml:

content_engine: "resource"

<lastmod> tag

The <lastmod> tag in the sitemap.xml will reflect by priority:

  1. A personalised date if you add the variable last_modified_at: with a date in the Front Matter. (Dates need to be formatted as %Y-%m-%d %H:%M:%S %z)
  2. The modified date of the file as reported by git log.

Exclusions

If you would like to exclude specific pages from the sitemap set the sitemap flag to false in the front matter for the page.

sitemap: false

To exclude multiple files, add a glob config to your bridgetown.config.yml file.

defaults:
  -
    scope:
      path: "assets/**/*.pdf"
    values:
      sitemap: false

Testing

  • Run bundle exec rake test to run the test suite
  • Or run script/cibuild to validate with Rubocop and run tests together.

Contributing

  1. Fork it (https://github.com/ayushn21/bridgetown-sitemap/fork)
  2. Clone the fork using git clone to your local development machine.
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

License

Bridgetown Sitemap is released under the MIT License.

Copyright © 2021 Ayush Newatia

bridgetown-sitemap's People

Contributors

ayushn21 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.