Coder Social home page Coder Social logo

sitemap's Introduction

Sitemap by FriendsOfFlarum

MIT license Latest Stable Version Total Downloads OpenCollective

This extension simply adds a sitemap to your forum.

It uses default entries like Discussions and Users, but is also smart enough to conditionally add further entries based on the availability of extensions. This currently applies to flarum/tags and fof/pages. Other extensions can easily inject their own Resource information, check Extending below.

There are several modes to use the sitemap.

Runtime mode

After enabling the extension the sitemap will be automatically be available and generated on the fly. It contains all Users, Discussions, Tags and Pages guests have access to.

Applicable to small forums, most likely on shared hosting environments, with discussions, users, tags and pages summed up being less than 10.000 items.

Cache or disk mode

You can set up a cron job that stores the sitemap into cache or onto disk. You need to run:

php flarum fof:sitemap:cache

To store the sitemap into cache. If you want to save the sitemap directly to your public folder, use the flag:

php flarum fof:sitemap:cache --write-xml-file

Best for small forums, most likely on hosting environments allowing cronjobs and with discussions, users, tags and pages summed up being less than 50.000 items.

50.000 is the technical limit for sitemap files. If you have more entries to store, use the following option!

Multi file mode

For larger forums you can set up a cron job that generates a sitemap index and compressed sitemap files.

php flarum fof:sitemap:multi

This command creates temporary files in your storage folder and if successful moves them over to the public directory automatically.

Best for larger forums, starting at 50.000 items.

Extending

In order to register your own resource, create a class that implements FoF\Sitemap\Resources\Resource. Make sure to implement all abstract methods, check other implementations for examples. After this, register your

return [
    new \FoF\Sitemap\Extend\RegisterResource(YourResource::class)
];

That's it.

Commissioned

The initial version of this extension was sponsored by profesionalreview.com.

Installation

Use Bazaar or install manually:

composer require fof/sitemap

Updating

composer update fof/sitemap
php flarum migrate
php flarum cache:clear

Links

sitemap's People

Contributors

clarkwinkelmann avatar luceos avatar wloot avatar

Watchers

James Cloos 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.