Skip to content

Sitemap generation for training catalog to fetch HSF material#105

Merged
ariostas merged 2 commits into
hsf-training:mainfrom
kennethrioja:main
Jun 23, 2025
Merged

Sitemap generation for training catalog to fetch HSF material#105
ariostas merged 2 commits into
hsf-training:mainfrom
kennethrioja:main

Conversation

@kennethrioja

Copy link
Copy Markdown
Contributor

Hello @ariostas

I would like to contribute to the training center as I am currently deploying a training catalog at CERN which will fetch material from the HSF training center. In order to do that I need the providers (you / HSF training center) to have a sitemap at the root of the website.

What I provided in the PR:

  • a simple bash script to create a sitemap.txt under public listing all the URLs/materials the HSF training center has.
  • amended package.json so that when developing and deploying the website, it executes the script.

Cheers

@netlify

netlify Bot commented Jun 23, 2025

Copy link
Copy Markdown

Deploy Preview for nimble-pothos-1ee962 ready!

Name Link
🔨 Latest commit 790c843
🔍 Latest deploy log https://app.netlify.com/projects/nimble-pothos-1ee962/deploys/6859666a772b520008f04b3f
😎 Deploy Preview https://deploy-preview-105--nimble-pothos-1ee962.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread package.json Outdated
"start": "gatsby develop",
"build": "gatsby build",
"build:sitemap": "./src/scripts/generate-sitemap.sh",
"build": "npm run build:sitemap && gatsby build",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the logs, it seems like the generate-sitemap.sh script is failing because public doesn't exist yet. I'm not sure if gatsby build deletes all the contents of public, so probably the safest solution is to switch the order here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw it too... Let's try this way then.

@kennethrioja

Copy link
Copy Markdown
Contributor Author

All good! sitemap.txt has been successfully created https://deploy-preview-105--nimble-pothos-1ee962.netlify.app/sitemap.txt

@ariostas ariostas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @kennethrioja! This looks good to me.

The netlify preview looks good, but could you also verify that it worked as you wanted? I'll merge after you confirm.

@ariostas ariostas merged commit 00dae1a into hsf-training:main Jun 23, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants