c676cf921d
* Made get_configuraiton sync * Update examples |
||
---|---|---|
.. | ||
init | ||
public | ||
src | ||
.env.example | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
Makefile.toml | ||
README.md | ||
rust-toolchain.toml | ||
sitemap-index.xml | ||
sitemap-static.xml |
README.md
Sitemaps with Axum
This project demonstrates how to serve a sitemap file using Axum using dynamic data (like blog posts in this case). An example Postgres database is used data source for storing blog post data that can be used to generate a dynamic site map based on blog post slugs. There's lots of sitemap crates, though this example uses the xml for example purposes.
Quick Start
We use Docker to provide a Postgres database for this sample, so make sure you have it installed.
$ docker -v
Docker version 25.0.3, build 4debf41
Once Docker has started on you local machine, run (make sure to have cargo-make
installed):
$ cargo make run
This will handle spinning up a Postgres container, initializing the example database, and launching the local dev server.