Supabase.js (Bubble plugin)
  • Setup
    • Basic Setup
      • General notes on Bubble setup
    • Supabase Auth
      • Initializing Auth
      • How to: Login
      • How to: Sign Up
      • How to: MFA
      • Identity linking
    • Supabase Data
      • How to: Fetch Data
      • Data Realtime V2 (beta)
      • Foreign Table
      • How to: Create a Thing
      • How to: Update a thing
      • How to: Delete a thing
      • Data Realtime
      • Optimization Tips
      • Schema Validation
      • Create XML Sitemap
    • Supabase Storage
    • Supabase Realtime
    • Supabase Edge Functions
      • Basic Edge Function
      • Bubble Setup
Powered by GitBook
On this page
  1. Setup
  2. Supabase Data

Create XML Sitemap

PreviousSchema ValidationNextSupabase Storage

Last updated 6 months ago

The plugin can create a sitemap two ways. One Client Side and the Other is Server Side.

Client-Side:

Found under the Data element. It uses the Output it recieved, meaning the list of things you've gotten from Supabase.

  • Field Name: this should be the exact name of the column name.

  • URL: The Base URL for building the links. It can be a dynamic or static text like https://myblog/posts/ and should end with a slash

  • Send to Storage: It will automatically send the file to the bucket ready to be used. Make sure you have the RLS setup. It will also override the file existing already under that name.

  • Download File: Downloads the XML file generated

  • Sitemap Name: name of the file/key, without the '.xml'

Server Side:

This is a separate action, which can and should be used as a Backend Workflow.

  • Raw JSON Input: Will be the Raw JSON text coming from most likely an API call to Supabase.

  • Field Name: this should be the exact name of the column name.

  • URL: The Base URL for building the links. It can be a dynamic or static text like https://myblog/posts/ and should end with a slash

  • Send to Storage: It will automatically send the file to the bucket ready to be used. It uses the Service Key for convenience so make sure to add that and it will also override the file existing already under that name.

  • Sitemap Name: name of the file/key, without the '.xml'

This action can be setup as a weekly on biweekly cron job, to update your Sitemap. I'd recommend to setup a recoursive Backend Workflow, where first using the API connector you get the response from Supabase, and pass the raw response to the action to update the file.

Generated Sitemap in both cases will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://your.bubbleapps.io/slug-1</loc>
    <lastmod>2024-11-05T16:24:48.176Z</lastmod>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://your.bubbleapps.io/slug-2</loc>
    <lastmod>2024-11-05T16:24:48.176Z</lastmod>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>https://your.bubbleapps.io/slug-3</loc>
    <lastmod>2024-11-05T16:24:48.176Z</lastmod>
    <priority>0.5</priority>
  </url>
</urlset>