50 lines
3 KiB
Markdown
50 lines
3 KiB
Markdown
---
|
|
date: 2025-05-28
|
|
title: Drupal-powered podcast pages
|
|
permalink: /daily/2025/05/28/drupal-powered-podcast-pages
|
|
---
|
|
|
|
<p>Following my daily email archive, I've recently switched the podcast pages on my website from Sculpin to Drupal/Tome.</p><p>The <a href="/podcast/28-using-ai-tools-web-coding">recent episode with Luke McCormick</a> was the first to be created in Drupal and served from static HTML generated by Tome, and I've since re-created the other podcast episodes and <a href="/podcast">the podcast landing page</a>.</p><p>The next steps are to re-add the links on a podcast episode page to other episodes with the same guests, and to rebuild the podcast feed that's used to update players like Spotify and PocketCasts.</p><p>Once I've finished this, I'll move on to <a href="/presentations">my presentations pages</a> as those are the ones that change next frequently.</p><h2>How am I doing this?</h2><p>A lot of the content is still served from HTML generated by Sculpin, which is stored in one directory on my server.</p><p>The newer content, generated by Tome, is stored in another directory.</p><p>In my Nginx configuration, I change the <code>root</code> value based on the URL, so depending on which page you're visiting, you'll get content from Sculpin or Tome.</p><p>Here's part of that configuration:</p><pre><code class="language-plaintext">server {
|
|
listen localhost:8095:
|
|
server_name www.oliverdavies.uk:
|
|
root /var/www/vhosts/website-sculpin;
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
}
|
|
|
|
location ~ ^/archive {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/core {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/daily/.+ {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/homelab {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/podcast {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/sites/default/files {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
|
|
location ~ ^/themes/custom/opdavies {
|
|
try_files $uri $uri.html $uri/index.html =404;
|
|
root /var/www/vhosts/website-tome;
|
|
}
|
|
}</code></pre><p>This is the same approach as <a href="/daily/2025/04/17/incrementally">upgrading incrementally</a> from old versions of software to new versions or different software.</p><p>Neither site knows about the other and they work independently.</p><p>My Nginx configuration is managed within <a href="https://code.oliverdavies.uk/opdavies/nix-config/src/commit/a994777ba631cf95a16e2bb8f71e344a50bc11f3/hosts/nixedo/modules/nginx/www.oliverdavies.uk/default.nix#L11-L39">my NixOS configuration</a>, so you can see the whole configuration for my website and how I've leveraged the Nix language to simplify the process of migrating new paths to Tome.</p>
|