Sitemapper

Fast, stream based XML Sitemap generator in Elixir

Digital Marketing & SEOElixirMIT

Abstract

Sitemapper is an open-source Digital Marketing & SEO project. Fast, stream based XML Sitemap generator in Elixir. Sitemapper is an Elixir library for generating XML Sitemaps. It is built using Elixir. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Digital Marketing & SEO mini project or final-year project.

1. Introduction

Sitemapper is an Elixir library for generating XML Sitemaps.

It's designed to generate large sitemaps while maintaining a low memory profile. It can persist sitemaps to Amazon S3, GCP Storage, disk or any other adapter you wish to write.

2. Objective

Fast, stream based XML Sitemap generator in Elixir

This project demonstrates how Elixir can be applied to a real-world Digital Marketing & SEO problem.

4. Technology Stack

Elixir

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • See the project README for exact requirements
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/breakroom/sitemapper.git
cd sitemapper
  1. Each URL can contain up to 1,000 images (as per Google's specification)
  2. Images can be hosted on different domains (if both are verified in Search Console)
  3. The image namespace is automatically included in the sitemap XML
def deps do
  [
    {:sitemapper, "~> 0.8"}
  ]
end
def generate_sitemap() do
    config = [
      store: Sitemapper.S3Store,
      store_config: [bucket: "example-bucket"],
      sitemap_url: "http://example-bucket.s3-aws-region.amazonaws.com"
    ]

    Stream.concat([1..100_001])
    |> Stream.map(fn i ->
      %Sitemapper.URL{
        loc: "http://example.com/page-#{i}",
        changefreq: :daily,
        lastmod: Date.utc_today()
      }
    end)
    |> Sitemapper.generate(config)
    |> Sitemapper.persist(config)
    |> Stream.run()
  end
def generate_sitemap() do
    config = [
      store: Sitemapper.S3Store,
      store_config: [bucket: "example-bucket"],
      sitemap_url: "http://example-bucket.s3-aws-region.amazonaws.com"
    ]

    Repo.transaction(fn ->
      User
      |> Repo.stream()
      |> Stream.map(fn %User{username: username, updated_at: updated_at} ->
        %Sitemapper.URL{
          loc: "http://example.com/users/#{username}",
          changefreq: :hourly,
          lastmod: updated_at
        }
      end)
      |> Sitemapper.generate(config)
      |> Sitemapper.persist(config)
      |> Stream.run()
    end)
  end
[
  store: Sitemapper.FileStore,
  store_config: [
    path: sitemap_folder_path
  ],
  sitemap_url: "http://yourdomain.com"
]

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Export reports to Google Sheets or PDF
  • Schedule weekly automated reports
  • Add competitor comparison

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Which marketing or SEO problem does this tool solve?
  2. Which data sources or APIs does it use (Search Console, Analytics, social platforms)?
  3. Which metrics or KPIs does it report and how are they calculated?
  4. How could the output help a business make decisions?
  5. How would you schedule it to run automatically?

9. Source Code & License

This project is developed by breakroom and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Digital Marketing & SEO project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Digital Marketing & SEO Internship