#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Add SEO sitemap, canonical, JSON-LD and keywords (#6858)
Anthony Stirling98a1c5587ba3
diff --git a/.gitignore b/.gitignoreindex ef63336c40..4599254295 100644--- a/.gitignore+++ b/.gitignore@@ -55,8 +55,9 @@ app/core/src/main/resources/static/index.htmlapp/core/src/main/resources/static/*.html!app/core/src/main/resources/static/api-landing.html!app/core/src/main/resources/static/mobile-upload.html-# Prerendered nested-route pages (e.g. settings/people.html)+# Prerendered nested-route pages (e.g. settings/people.html, processor/sources.html)app/core/src/main/resources/static/settings/+app/core/src/main/resources/static/processor/app/core/src/main/resources/static/locales/app/core/src/main/resources/static/Login/app/core/src/main/resources/static/classic-logo/@@ -66,6 +67,7 @@ app/core/src/main/resources/static/samples/app/core/src/main/resources/static/manifest-classic.jsonapp/core/src/main/resources/static/og-metadata.jsonapp/core/src/main/resources/static/og-metadata.saas.json+app/core/src/main/resources/static/sitemap.xmlapp/core/src/main/resources/static/sw-folder-retry.jsapp/core/src/main/resources/static/robots.txtapp/core/src/main/resources/static/android-chrome-*.pngdiff --git a/app/core/build.gradle b/app/core/build.gradleindex 8a842fd2de..16fc5f16ac 100644--- a/app/core/build.gradle+++ b/app/core/build.gradle@@ -330,8 +330,11 @@ tasks.register('cleanFrontendAssets', Delete) {// api-landing.html, mobile-upload.html and mobile-sign.html are real backend source files,// not generated artifacts.delete fileTree(dir: resourcesStaticDir, includes: ['*.html'], excludes: ['api-landing.html', 'mobile-upload.html', 'mobile-sign.html'])- // Nested prerendered route pages (e.g. settings/people.html)+ // Nested prerendered route pages (e.g. settings/people.html, processor/sources.html)delete new File(resourcesStaticDir, 'settings')+ delete new File(resourcesStaticDir, 'processor')+ // Generated SEO sitemap (only emitted when a canonical domain is set at build).+ delete new File(resourcesStaticDir, 'sitemap.xml')}tasks.register('copyApiLandingPage', Copy) {diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.javaindex 89d4bb9956..77633b5008 100644--- a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java+++ b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java@@ -5,9 +5,13 @@ import java.io.InputStream;import java.nio.charset.StandardCharsets;import java.nio.file.Files;import java.nio.file.Path;+import java.util.HashSet;import java.util.List;+import java.util.Map;import java.util.Set;+import java.util.concurrent.ConcurrentHashMap;import java.util.regex.Pattern;+import java.util.stream.Stream;import org.springframework.beans.factory.annotation.Value;import org.springframework.context.annotation.Bean;@@ -15,12 +19,14 @@ import org.springframework.core.Ordered;import org.springframework.core.io.ClassPathResource;import org.springframework.core.io.FileSystemResource;import org.springframework.core.io.Resource;+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;import org.springframework.http.CacheControl;import org.springframework.http.MediaType;import org.springframework.http.ResponseEntity;import org.springframework.http.converter.StringHttpMessageConverter;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.GetMapping;+import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.servlet.function.RouterFunction;import org.springframework.web.servlet.function.RouterFunctions;import org.springframework.web.servlet.function.ServerResponse;@@ -40,6 +46,17 @@ public class ReactRoutingController {org.slf4j.LoggerFactory.getLogger(ReactRoutingController.class);private static final Pattern BASE_HREF_PATTERN =Pattern.compile("<base href=\\\"[^\\\"]*\\\"\\s*/?>");+ // Clean URL segment: no dots, slashes or traversal - matches the prerendered+ // file naming (e.g. compress -> compress.html, settings/people).+ private static final Pattern SAFE_SEGMENT = Pattern.compile("[A-Za-z0-9_-]+");+ // Static HTML that is not a prerendered SPA route.+ private static final Set<String> NON_ROUTE_HTML =+ Set.of("index", "api-landing", "saas-landing", "mobile-upload", "mobile-sign");+ // Route keys that have a prerendered file, discovered once at startup. Requests+ // outside it never reach disk or the cache, so it cannot be grown by a caller.+ private volatile Set<String> prerenderedRoutes = Set.of();+ // Route key -> processed prerendered HTML; bounded by prerenderedRoutes.+ private final Map<String, String> prerenderedCache = new ConcurrentHashMap<>();// First path segments owned by the backend or static assets, never SPA routes.// Mirrors the exclusion regexes on forwardRootPaths/forwardNestedPaths below.@@ -112,6 +129,10 @@ public class ReactRoutingController {this.cachedMobileSignHtml = readStaticHtml("mobile-sign.html");this.mobileSignHtmlExists = this.cachedMobileSignHtml != null;+ this.prerenderedCache.clear();+ this.prerenderedRoutes = discoverPrerenderedRoutes();+ log.debug("Prerendered SPA route pages found: {}", prerenderedRoutes.size());+// Check for external index.html first (customFiles/static/)Path externalIndexPath = Path.of(InstallationPathConfig.getStaticPath(), "index.html");log.debug("Checking for custom index.html at: {}", externalIndexPath);@@ -155,22 +176,7 @@ public class ReactRoutingController {try (InputStream inputStream = resource.getInputStream()) {String html = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);-- // Replace %BASE_URL% with the actual context path for base href- String baseUrl = contextPath.endsWith("/") ? contextPath : contextPath + "/";- html = html.replace("%BASE_URL%", baseUrl);- // Also rewrite any existing <base> tag (Vite may have baked one in)- html =- BASE_HREF_PATTERN- .matcher(html)- .replaceFirst("<base href=\\\"" + baseUrl + "\\\" />");-- // Inject context path as a global variable for API calls- String contextPathScript =- "<script>window.STIRLING_PDF_API_BASE_URL = '" + baseUrl + "';</script>";- html = html.replace("</head>", contextPathScript + "</head>");-- return html;+ return applyContextPath(html);}} catch (Exception ex) {if (!loggedMissingIndex) {@@ -181,6 +187,115 @@ public class ReactRoutingController {}}+ // Apply the deploy's context path to a built HTML shell: fill %BASE_URL%,+ // rewrite the baked <base href>, and expose the API base to the SPA.+ private String applyContextPath(String html) {+ String baseUrl = contextPath.endsWith("/") ? contextPath : contextPath + "/";+ html = html.replace("%BASE_URL%", baseUrl);+ html =+ BASE_HREF_PATTERN+ .matcher(html)+ .replaceFirst("<base href=\\\"" + baseUrl + "\\\" />");+ String contextPathScript =+ "<script>window.STIRLING_PDF_API_BASE_URL = '" + baseUrl + "';</script>";+ return html.replace("</head>", contextPathScript + "</head>");+ }++ // Serve the prerendered per-route HTML (e.g. compress.html) for a clean URL so+ // crawlers and link unfurlers get the route's title/OG/canonical/JSON-LD. Falls+ // back to the generic index.html shell when no prerendered page exists.+ private ResponseEntity<String> servePrerenderedOrIndex(+ HttpServletRequest request, String... segments) {+ String html = lookupPrerendered(segments);+ if (html != null) {+ return ResponseEntity.ok()+ .cacheControl(CacheControl.noCache().mustRevalidate())+ .contentType(MediaType.TEXT_HTML)+ .body(html);+ }+ return serveIndexHtml(request);+ }++ private String lookupPrerendered(String... segments) {+ if (segments == null || segments.length == 0) {+ return null;+ }+ for (String segment : segments) {+ if (segment == null || !SAFE_SEGMENT.matcher(segment).matches()) {+ return null;+ }+ }+ String key = String.join("/", segments);+ if (!prerenderedRoutes.contains(key)) {+ return null;+ }+ String cached = prerenderedCache.get(key);+ if (cached != null) {+ return cached;+ }+ String html = readStaticHtml(key + ".html");+ if (html == null) {+ return null;+ }+ String processed = applyContextPath(html);+ prerenderedCache.put(key, processed);+ return processed;+ }++ // Index the prerendered route pages that actually exist so serving them never+ // needs a lookup keyed on an arbitrary request path.+ private Set<String> discoverPrerenderedRoutes() {+ Set<String> routes = new HashSet<>();+ PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();+ // One and two segments - the depths forwardRootPaths/forwardNestedPaths serve.+ for (String pattern : List.of("classpath:/static/*.html", "classpath:/static/*/*.html")) {+ try {+ for (Resource resource : resolver.getResources(pattern)) {+ addPrerenderedRoute(routes, resource.getURL().getPath());+ }+ } catch (Exception ex) {+ log.debug("Could not scan {} for prerendered pages", pattern, ex);+ }+ }+ // The custom static dir wins in readStaticHtml, so it must be indexed too.+ Path externalRoot = Path.of(InstallationPathConfig.getStaticPath());+ if (Files.isDirectory(externalRoot)) {+ try (Stream<Path> paths = Files.walk(externalRoot, 2)) {+ paths.filter(p -> p.toString().endsWith(".html"))+ .forEach(p -> addPrerenderedRoute(routes, externalRoot.relativize(p)));+ } catch (Exception ex) {+ log.debug("Could not scan {} for prerendered pages", externalRoot, ex);+ }+ }+ return Set.copyOf(routes);+ }++ private static void addPrerenderedRoute(Set<String> routes, Path relative) {+ addPrerenderedRoute(routes, relative.toString().replace('\\', '/'));+ }++ // `location` is a resource path/URL; only the part after the static root and+ // before ".html" is the route key (e.g. .../static/settings/people.html).+ private static void addPrerenderedRoute(Set<String> routes, String location) {+ if (!location.endsWith(".html")) {+ return;+ }+ int staticIndex = location.lastIndexOf("static/");+ String key =+ staticIndex < 0 ? location : location.substring(staticIndex + "static/".length());+ key = key.substring(0, key.length() - ".html".length());+ String[] segments = key.split("/");+ if (segments.length == 0 || segments.length > 2 || NON_ROUTE_HTML.contains(key)) {+ return;+ }+ for (String segment : segments) {+ if (!SAFE_SEGMENT.matcher(segment).matches()) {+ return;+ }+ }+ routes.add(key);+ }+private Resource getIndexHtmlResource() {// Check external location firstPath externalIndexPath = Path.of(InstallationPathConfig.getStaticPath(), "index.html");@@ -296,15 +411,19 @@ public class ReactRoutingController {// excluded by the leading `api` token in the same regex.)@GetMapping("/{path:^(?!api|static|robots\\.txt|favicon\\.ico|manifest.*\\.json|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|modern-logo|classic-logo|Login|og_images|samples)[^\\.]*$}")- public ResponseEntity<String> forwardRootPaths(HttpServletRequest request) throws IOException {- return serveIndexHtml(request);+ public ResponseEntity<String> forwardRootPaths(+ HttpServletRequest request, @PathVariable("path") String path) throws IOException {+ return servePrerenderedOrIndex(request, path);}@GetMapping("/{path:^(?!api|static|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|modern-logo|classic-logo|Login|og_images|samples)[^\\.]*}/{subpath:^(?!.*\\.).*$}")- public ResponseEntity<String> forwardNestedPaths(HttpServletRequest request)+ public ResponseEntity<String> forwardNestedPaths(+ HttpServletRequest request,+ @PathVariable("path") String path,+ @PathVariable("subpath") String subpath)throws IOException {- return serveIndexHtml(request);+ return servePrerenderedOrIndex(request, path, subpath);}// The regex mappings above only cover 1- and 2-segment paths (Spring path variables cannotdiff --git a/app/core/src/test/java/stirling/software/SPDF/controller/web/ReactRoutingControllerTest.java b/app/core/src/test/java/stirling/software/SPDF/controller/web/ReactRoutingControllerTest.javaindex 41909e3e0a..3989d315f4 100644--- a/app/core/src/test/java/stirling/software/SPDF/controller/web/ReactRoutingControllerTest.java+++ b/app/core/src/test/java/stirling/software/SPDF/controller/web/ReactRoutingControllerTest.java@@ -5,7 +5,9 @@ import static org.mockito.Mockito.mock;import java.lang.reflect.Field;import java.util.List;+import java.util.Map;import java.util.Optional;+import java.util.Set;import org.junit.jupiter.api.BeforeEach;import org.junit.jupiter.api.Test;@@ -168,10 +170,23 @@ class ReactRoutingControllerTest {// --- forwarding routes ---@Test- void forwardRootPaths_servesIndexHtml() throws Exception {+ void forwardRootPaths_noPrerenderedFile_fallsBackToIndexHtml() throws Exception {controller.init();- ResponseEntity<String> response = controller.forwardRootPaths(request);+ // No prerendered compress.html on the test classpath -> generic shell.+ ResponseEntity<String> response = controller.forwardRootPaths(request, "compress");++ assertEquals(HttpStatus.OK, response.getStatusCode());+ assertNotNull(response.getBody());+ assertTrue(response.getBody().contains("Stirling PDF"));+ }++ @Test+ void forwardRootPaths_unsafeSegment_fallsBackToIndexHtml() throws Exception {+ controller.init();++ // A dotted segment must never be turned into a file lookup.+ ResponseEntity<String> response = controller.forwardRootPaths(request, "e.tag");assertEquals(HttpStatus.OK, response.getStatusCode());assertNotNull(response.getBody());@@ -181,12 +196,48 @@ class ReactRoutingControllerTest {void forwardNestedPaths_servesIndexHtml() throws Exception {controller.init();- ResponseEntity<String> response = controller.forwardNestedPaths(request);+ ResponseEntity<String> response =+ controller.forwardNestedPaths(request, "settings", "people");assertEquals(HttpStatus.OK, response.getStatusCode());assertNotNull(response.getBody());}+ @Test+ void forwardRootPaths_prerenderedFile_servesItAndCachesIt() throws Exception {+ controller.init();++ // static/prerender-test.html is a test-resource fixture on the classpath.+ ResponseEntity<String> response = controller.forwardRootPaths(request, "prerender-test");++ assertEquals(HttpStatus.OK, response.getStatusCode());+ assertNotNull(response.getBody());+ assertTrue(response.getBody().contains("<title>Prerender Test - Stirling PDF</title>"));+ // context path applied on the way out, then memoised under the route key+ assertTrue(response.getBody().contains("window.STIRLING_PDF_API_BASE_URL"));+ assertEquals(Set.of("prerender-test"), prerenderedCache().keySet());+ }++ @Test+ void forwardPaths_unknownRoutes_neverGrowTheCache() throws Exception {+ controller.init();++ for (int i = 0; i < 100; i++) {+ controller.forwardRootPaths(request, "not-a-route-" + i);+ controller.forwardNestedPaths(request, "not-a-route-" + i, "child-" + i);+ }++ // An unrouted path must not be able to allocate a cache entry.+ assertTrue(prerenderedCache().isEmpty());+ }++ @SuppressWarnings("unchecked")+ private Map<String, String> prerenderedCache() throws Exception {+ Field field = ReactRoutingController.class.getDeclaredField("prerenderedCache");+ field.setAccessible(true);+ return (Map<String, String>) field.get(controller);+ }+// --- deep-link SPA fallback (router function) ---@Testdiff --git a/app/core/src/test/resources/static/prerender-test.html b/app/core/src/test/resources/static/prerender-test.htmlnew file mode 100644index 0000000000..4726d5dede--- /dev/null+++ b/app/core/src/test/resources/static/prerender-test.html@@ -0,0 +1,11 @@+<!doctype html>+<!-- Fixture for ReactRoutingControllerTest: a prerendered SPA route page. -->+<html lang="en-US">+ <head>+ <base href="./" />+ <title>Prerender Test - Stirling PDF</title>+ </head>+ <body>+ <div id="root"></div>+ </body>+</html>diff --git a/frontend/.oxfmtrc.json b/frontend/.oxfmtrc.jsonindex 7a8f433c56..913613766f 100644--- a/frontend/.oxfmtrc.json+++ b/frontend/.oxfmtrc.json@@ -15,6 +15,7 @@"editor/public/og-metadata.json","editor/public/og-metadata.saas.json","editor/src/core/data/ogImageMap.json",+ "editor/src/core/data/urlSeoOverrides.json","editor/src/core/generated/docsManifest.json","editor/public/pdfjs*/","editor/public/js/thirdParty/",diff --git a/frontend/editor/index.html b/frontend/editor/index.htmlindex 1e782db2de..7b752f9f6e 100644--- a/frontend/editor/index.html+++ b/frontend/editor/index.html@@ -11,12 +11,12 @@<meta name="theme-color" content="#000000" /><metaname="description"- content="The Free Adobe Acrobat alternative (10M+ Downloads)"+ content="A free, private PDF editor you can run on any infrastructure."/><link rel="apple-touch-icon" href="modern-logo/logo192.png" /><link rel="manifest" href="manifest.json" />- <title>Stirling PDF</title>+ <title>Stirling PDF - 30M+ Downloads</title><!-- Apply theme before first paint (no FOUC); mirrors ThemeProvider, which then refines it. --><script>diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.tomlindex ba08459e61..f18b06d768 100644--- a/frontend/editor/public/locales/en-US/translation.toml+++ b/frontend/editor/public/locales/en-US/translation.toml@@ -1928,7 +1928,7 @@ underline = "Underline"width = "Width"[app]-description = "The Free Adobe Acrobat alternative (10M+ Downloads)"+description = "A free, private PDF editor you can run on any infrastructure."[appBanner]dismiss = "Dismiss"diff --git a/frontend/editor/public/og-metadata.json b/frontend/editor/public/og-metadata.jsonindex 34c560399c..5537aa0883 100644--- a/frontend/editor/public/og-metadata.json+++ b/frontend/editor/public/og-metadata.json@@ -1,18 +1,18 @@{"default": {"image": "/og_images/home.png",- "title": "Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Stirling PDF - 30M+ Downloads",+ "description": "A free, private PDF editor you can run on any infrastructure."},"byTool": {"certSign": {"image": "/og_images/certSign.png",- "title": "Certificate Sign - Stirling PDF",+ "title": "Sign PDF with a Certificate - Stirling PDF","description": "Sign PDF documents using digital certificates"},"sign": {"image": "/og_images/sign.png",- "title": "Sign - Stirling PDF",+ "title": "Sign PDF - Stirling PDF","description": "Adds signature to PDF by drawing, text or image"},"sharedSign": {@@ -22,82 +22,82 @@},"addText": {"image": "/og_images/add-text.png",- "title": "Add Text - Stirling PDF",+ "title": "Add Text to PDF - Stirling PDF","description": "Add custom text anywhere in your PDF"},"addPassword": {"image": "/og_images/add-password.png",- "title": "Add Password - Stirling PDF",+ "title": "Password Protect PDF - Stirling PDF","description": "Add password protection and restrictions to PDF files"},"removePassword": {"image": "/og_images/remove-password.png",- "title": "Remove Password - Stirling PDF",+ "title": "Remove PDF Password - Stirling PDF","description": "Remove password protection from PDF documents"},"removePages": {"image": "/og_images/remove.png",- "title": "Remove Pages - Stirling PDF",+ "title": "Delete Pages from PDF - Stirling PDF","description": "Remove specific pages from a PDF document"},"removeBlanks": {"image": "/og_images/remove-blank-pages.png",- "title": "Remove Blank Pages - Stirling PDF",+ "title": "Remove Blank Pages from PDF - Stirling PDF","description": "Remove blank pages from PDF documents"},"removeAnnotations": {"image": "/og_images/remove-annotations.png",- "title": "Remove Annotations - Stirling PDF",+ "title": "Remove Annotations from PDF - Stirling PDF","description": "Remove annotations and comments from PDF documents"},"removeImage": {"image": "/og_images/remove-image.png",- "title": "Remove Images - Stirling PDF",+ "title": "Remove Images from PDF - Stirling PDF","description": "Remove all images from a PDF document"},"changePermissions": {"image": "/og_images/change-permissions.png",- "title": "Change Permissions - Stirling PDF",+ "title": "Change PDF Permissions - Stirling PDF","description": "Change document restrictions and permissions"},"watermark": {"image": "/og_images/add-watermark.png",- "title": "Add Watermark - Stirling PDF",+ "title": "Add Watermark to PDF - Stirling PDF","description": "Add a custom watermark to your PDF document."},"sanitize": {"image": "/og_images/sanitize.png",- "title": "Sanitize - Stirling PDF",+ "title": "Sanitize PDF - Stirling PDF","description": "Remove potentially harmful elements from PDF files"},"split": {"image": "/og_images/split.png",- "title": "Split - Stirling PDF",+ "title": "Split PDF - Stirling PDF","description": "Split PDFs into multiple documents"},"merge": {"image": "/og_images/mergePdfs.png",- "title": "Merge - Stirling PDF",+ "title": "Merge PDF - Stirling PDF","description": "Merge multiple PDFs into a single document"},"convert": {"image": "/og_images/convert.png",- "title": "Convert - Stirling PDF",+ "title": "PDF Converter - Stirling PDF","description": "Convert files to and from PDF format"},"ocr": {"image": "/og_images/ocr.png",- "title": "OCR - Stirling PDF",+ "title": "OCR PDF - Stirling PDF","description": "Extract text from scanned PDFs using Optical Character Recognition"},"addImage": {"image": "/og_images/add-image.png",- "title": "Add Image - Stirling PDF",+ "title": "Add Image to PDF - Stirling PDF","description": "Add images anywhere in your PDF"},"rotate": {"image": "/og_images/rotate.png",- "title": "Rotate - Stirling PDF",+ "title": "Rotate PDF - Stirling PDF","description": "Easily rotate your PDFs."},"autoRotate": {@@ -107,42 +107,42 @@},"annotate": {"image": "/og_images/annotate.png",- "title": "Annotate - Stirling PDF",+ "title": "Annotate PDF - Stirling PDF","description": "Highlight, draw, add notes, and shapes directly in the viewer"},"scannerImageSplit": {"image": "/og_images/detect-split-scanned-photos.png",- "title": "Detect & Split Scanned Photos - Stirling PDF",+ "title": "Split Scanned Photos - Stirling PDF","description": "Detect and split scanned photos into separate pages"},"editTableOfContents": {"image": "/og_images/edit-table-of-contents.png",- "title": "Edit Table of Contents - Stirling PDF",+ "title": "Edit PDF Bookmarks - Stirling PDF","description": "Add or edit bookmarks and table of contents in PDF documents"},"scannerEffect": {"image": "/og_images/scanner-effect.png",- "title": "Scanner Effect - Stirling PDF",+ "title": "Make a PDF Look Scanned - Stirling PDF","description": "Create a PDF that looks like it was scanned"},"autoRename": {"image": "/og_images/auto-rename-pdf-file.png",- "title": "Auto Rename PDF File - Stirling PDF",+ "title": "Auto Rename PDF Files - Stirling PDF","description": "Automatically rename PDF files based on their content"},"pageLayout": {"image": "/og_images/multi-page-layout.png",- "title": "Multi-Page Layout - Stirling PDF",+ "title": "PDF Multi-Page Layout - Stirling PDF","description": "Merge multiple pages of a PDF document into a single page"},"scalePages": {"image": "/og_images/adjust-page-size-scale.png",- "title": "Adjust page size/scale - Stirling PDF",+ "title": "Resize PDF Pages - Stirling PDF","description": "Change the size/scale of a page and/or its contents."},"adjustContrast": {"image": "/og_images/adjust-colors-contrast.png",- "title": "Adjust Colors/Contrast - Stirling PDF",+ "title": "Adjust PDF Colors and Contrast - Stirling PDF","description": "Adjust colors and contrast of PDF documents"},"crop": {@@ -152,37 +152,37 @@},"pdfToSinglePage": {"image": "/og_images/single-large-page.png",- "title": "PDF to Single Large Page - Stirling PDF",+ "title": "Combine PDF into a Single Page - Stirling PDF","description": "Merges all PDF pages into one large single page"},"repair": {"image": "/og_images/repair.png",- "title": "Repair - Stirling PDF",+ "title": "Repair PDF - Stirling PDF","description": "Repair corrupted or damaged PDF files"},"compare": {"image": "/og_images/compare.png",- "title": "Compare - Stirling PDF",+ "title": "Compare PDF Files - Stirling PDF","description": "Compare two PDF documents and highlight differences"},"addPageNumbers": {"image": "/og_images/add-page-numbers.png",- "title": "Add Page Numbers - Stirling PDF",+ "title": "Add Page Numbers to PDF - Stirling PDF","description": "Add Page numbers throughout a document in a set location"},"redact": {"image": "/og_images/redact.png",- "title": "Redact - Stirling PDF",+ "title": "Redact PDF - Stirling PDF","description": "Permanently remove sensitive information from PDF documents"},"flatten": {"image": "/og_images/flatten.png",- "title": "Flatten - Stirling PDF",+ "title": "Flatten PDF - Stirling PDF","description": "Remove all interactive elements and forms from a PDF"},"removeCertSign": {"image": "/og_images/remove-certificate-sign.png",- "title": "Remove Certificate Sign - Stirling PDF",+ "title": "Remove PDF Certificate Signature - Stirling PDF","description": "Remove digital signature from PDF documents"},"unlockPDFForms": {@@ -192,7 +192,7 @@},"compress": {"image": "/og_images/compress.png",- "title": "Compress - Stirling PDF",+ "title": "Compress PDF - Stirling PDF","description": "Compress PDFs to reduce their file size."},"classify": {@@ -202,17 +202,17 @@},"extractPages": {"image": "/og_images/extract-pages.png",- "title": "Extract Pages - Stirling PDF",+ "title": "Extract PDF Pages - Stirling PDF","description": "Extract specific pages from a PDF document"},"reorganizePages": {"image": "/og_images/reorganize-pages.png",- "title": "Reorganize Pages - Stirling PDF",+ "title": "Organize PDF Pages - Stirling PDF","description": "Rearrange, duplicate, or delete PDF pages with visual drag-and-drop control."},"extractImages": {"image": "/og_images/extract-images.png",- "title": "Extract Images - Stirling PDF",+ "title": "Extract Images from PDF - Stirling PDF","description": "Extract images from PDF documents"},"addStamp": {@@ -222,7 +222,7 @@},"addAttachments": {"image": "/og_images/add-attachments.png",- "title": "Add Attachments - Stirling PDF",+ "title": "Add Attachments to PDF - Stirling PDF","description": "Add or remove embedded files (attachments) to/from a PDF"},"createPortfolio": {@@ -232,17 +232,17 @@},"changeMetadata": {"image": "/og_images/change-metadata.png",- "title": "Change Metadata - Stirling PDF",+ "title": "Edit PDF Metadata - Stirling PDF","description": "Change/Remove/Add metadata from a PDF document"},"overlayPdfs": {"image": "/og_images/overlay-pdfs.png",- "title": "Overlay Pdfs - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Overlay PDFs - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure."},"getPdfInfo": {"image": "/og_images/get-all-info-on-pdf.png",- "title": "Get ALL Info on PDF - Stirling PDF",+ "title": "PDF Info and Metadata Viewer - Stirling PDF","description": "Grabs any and all information possible on PDFs"},"validateSignature": {@@ -257,27 +257,27 @@},"replaceColor": {"image": "/og_images/replace-and-invert-color.png",- "title": "Replace & Invert Color - Stirling PDF",+ "title": "Replace and Invert PDF Colors - Stirling PDF","description": "Replace or invert colors in PDF documents"},"showJS": {"image": "/og_images/show-javascript.png",- "title": "Show JavaScript - Stirling PDF",+ "title": "Show JavaScript in PDF - Stirling PDF","description": "Extract and display JavaScript code from PDF documents"},"bookletImposition": {"image": "/og_images/booklet-imposition.png",- "title": "Booklet Imposition - Stirling PDF",+ "title": "Create a PDF Booklet - Stirling PDF","description": "Create booklets with proper page ordering and multi-page layout for printing and binding"},"pdfTextEditor": {"image": "/og_images/pdf-text-editor.png",- "title": "PDF Text Editor - Stirling PDF",+ "title": "Edit PDF Text - Stirling PDF","description": "Review and edit text and images in PDFs with grouped text editing and PDF regeneration"},"formFill": {"image": "/og_images/form-fill.png",- "title": "Form Editor - Stirling PDF",+ "title": "Fill PDF Forms - Stirling PDF","description": "Fill, create, edit, and delete PDF form fields with a visual editor"},"autoFormDetection": {@@ -287,298 +287,491 @@},"multiTool": {"image": "/og_images/multi-tool.png",- "title": "Multi-Tool - Stirling PDF",+ "title": "PDF Page Editor - Stirling PDF","description": "Use multiple tools on a single PDF document"},"read": {"image": "/og_images/read.png",- "title": "Read - Stirling PDF",+ "title": "PDF Viewer - Stirling PDF","description": "View and annotate PDFs. Highlight text, draw, or insert comments for review and collaboration."},"automate": {"image": "/og_images/automate.png",- "title": "Automate - Stirling PDF",+ "title": "PDF Workflow Automation - Stirling PDF","description": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."},"devApi": {"image": "/og_images/dev-api.png","title": "API - Stirling PDF",- "description": "Link to API documentation"+ "description": "Link to API documentation",+ "noindex": true},"devFolderScanning": {"image": "/og_images/dev-folder-scanning.png","title": "Automated Folder Scanning - Stirling PDF",- "description": "Link to automated folder scanning guide"+ "description": "Link to automated folder scanning guide",+ "noindex": true},"devSsoGuide": {"image": "/og_images/dev-sso-guide.png","title": "SSO Guide - Stirling PDF",- "description": "Link to SSO guide"+ "description": "Link to SSO guide",+ "noindex": true},"devAirgapped": {"image": "/og_images/dev-airgapped.png","title": "Air-gapped Setup - Stirling PDF",- "description": "Link to air-gapped setup guide"+ "description": "Link to air-gapped setup guide",+ "noindex": true},"/editor": {"image": "/og_images/home.png","title": "Editor - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/login": {"image": "/og_images/home.png","title": "Sign In - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/mobile-scanner": {"image": "/og_images/home.png","title": "Mobile Scanner - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/files": {"image": "/og_images/home.png","title": "Files - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings": {"image": "/og_images/home.png","title": "Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/docs": {+ "image": "/og_images/home.png",+ "title": "Documentation - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor": {+ "image": "/og_images/home.png",+ "title": "Processor - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/pipelines": {+ "image": "/og_images/home.png",+ "title": "Pipelines - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/sources": {+ "image": "/og_images/home.png",+ "title": "Sources - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/integrations": {+ "image": "/og_images/home.png",+ "title": "Integrations - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/documents": {+ "image": "/og_images/home.png",+ "title": "Documents - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/review": {+ "image": "/og_images/home.png",+ "title": "Review - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/preferences": {"image": "/og_images/home.png","title": "Preferences Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/notifications": {"image": "/og_images/home.png","title": "Notifications Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/connections": {"image": "/og_images/home.png","title": "Connections Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/account": {"image": "/og_images/home.png","title": "Account Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/general": {"image": "/og_images/home.png","title": "General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/people": {"image": "/og_images/home.png","title": "People Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/teams": {"image": "/og_images/home.png","title": "Teams Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/security": {"image": "/og_images/home.png","title": "Security Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/identity": {"image": "/og_images/home.png","title": "Identity Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/plan": {"image": "/og_images/home.png","title": "Plan Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/payments": {"image": "/og_images/home.png","title": "Payments Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/requests": {"image": "/og_images/home.png","title": "Requests Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/developer": {"image": "/og_images/home.png","title": "Developer Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/api-keys": {"image": "/og_images/home.png",- "title": "Api Keys Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "API Keys Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/hotkeys": {"image": "/og_images/home.png","title": "Hotkeys Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminGeneral": {"image": "/og_images/home.png","title": "Admin General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminSecurity": {"image": "/og_images/home.png","title": "Admin Security Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminConnections": {"image": "/og_images/home.png","title": "Admin Connections Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPrivacy": {"image": "/og_images/home.png","title": "Admin Privacy Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminDatabase": {"image": "/og_images/home.png","title": "Admin Database Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAdvanced": {"image": "/og_images/home.png","title": "Admin Advanced Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminLegal": {"image": "/og_images/home.png","title": "Admin Legal Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPremium": {"image": "/og_images/home.png","title": "Admin Premium Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminFeatures": {"image": "/og_images/home.png","title": "Admin Features Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPlan": {"image": "/og_images/home.png","title": "Admin Plan Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAudit": {"image": "/og_images/home.png","title": "Admin Audit Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminUsage": {"image": "/og_images/home.png","title": "Admin Usage Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminEndpoints": {"image": "/og_images/home.png","title": "Admin Endpoints Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminStorageSharing": {"image": "/og_images/home.png","title": "Admin Storage Sharing Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminFolderAccess": {"image": "/og_images/home.png","title": "Admin Folder Access Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminMcp": {"image": "/og_images/home.png",- "title": "Admin Mcp Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin MCP Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiGeneral": {"image": "/og_images/home.png",- "title": "Admin Ai General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI General Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiModels": {"image": "/og_images/home.png",- "title": "Admin Ai Models Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Models Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiDocuments": {"image": "/og_images/home.png",- "title": "Admin Ai Documents Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Documents Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiLimits": {"image": "/og_images/home.png",- "title": "Admin Ai Limits Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Limits Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAi": {"image": "/og_images/home.png",- "title": "Admin Ai Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/help": {"image": "/og_images/home.png","title": "Help Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/legal": {"image": "/og_images/home.png","title": "Legal Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/backendThirdPartyLicenses": {"image": "/og_images/home.png","title": "Backend Third Party Licenses Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/frontendThirdPartyLicenses": {"image": "/og_images/home.png","title": "Frontend Third Party Licenses Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/about": {"image": "/og_images/home.png","title": "About Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/payg": {"image": "/og_images/home.png",- "title": "Payg Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Pay As You Go Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/account-link": {"image": "/og_images/home.png","title": "Account Link Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/users": {"image": "/og_images/home.png","title": "Users Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/billing": {"image": "/og_images/home.png","title": "Billing Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/audit": {"image": "/og_images/home.png","title": "Audit Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/storage": {"image": "/og_images/home.png","title": "Storage Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/pdf-to-word": {+ "image": "/og_images/convert.png",+ "title": "PDF to Word Converter - Stirling PDF",+ "description": "Convert PDF files into editable Microsoft Word (DOCX) documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-xlsx": {+ "image": "/og_images/convert.png",+ "title": "PDF to Excel Converter - Stirling PDF",+ "description": "Convert PDF tables into editable Microsoft Excel (XLSX) spreadsheets. Free, fast, and private."+ },+ "/pdf-to-csv": {+ "image": "/og_images/convert.png",+ "title": "PDF to CSV Converter - Stirling PDF",+ "description": "Extract tables from PDF files into CSV data. Free, fast, and private - no signup required."+ },+ "/pdf-to-img": {+ "image": "/og_images/convert.png",+ "title": "PDF to Image Converter - Stirling PDF",+ "description": "Convert PDF pages into high-quality JPG or PNG images. Free and private, right in your browser."+ },+ "/pdf-to-presentation": {+ "image": "/og_images/convert.png",+ "title": "PDF to PowerPoint Converter - Stirling PDF",+ "description": "Convert PDF files into editable PowerPoint (PPTX) presentations. Free, fast, and private."+ },+ "/pdf-to-text": {+ "image": "/og_images/convert.png",+ "title": "PDF to Text Converter - Stirling PDF",+ "description": "Extract plain text from PDF documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-markdown": {+ "image": "/og_images/convert.png",+ "title": "PDF to Markdown Converter - Stirling PDF",+ "description": "Convert PDF documents into clean Markdown text. Free and private, right in your browser."+ },+ "/pdf-to-html": {+ "image": "/og_images/convert.png",+ "title": "PDF to HTML Converter - Stirling PDF",+ "description": "Convert PDF documents into HTML web pages. Free and private, right in your browser."+ },+ "/pdf-to-xml": {+ "image": "/og_images/convert.png",+ "title": "PDF to XML Converter - Stirling PDF",+ "description": "Convert PDF documents into structured XML. Free, fast, and private."+ },+ "/pdf-to-pdfa": {+ "image": "/og_images/convert.png",+ "title": "PDF to PDF/A Converter - Stirling PDF",+ "description": "Convert PDFs to the PDF/A archival standard for long-term preservation. Free and private."+ },+ "/img-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Image to PDF Converter - Stirling PDF",+ "description": "Convert JPG, PNG, and other images into a single PDF document. Free, fast, and private."+ },+ "/html-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "HTML to PDF Converter - Stirling PDF",+ "description": "Convert HTML files and web pages into PDF documents. Free, fast, and private."+ },+ "/markdown-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Markdown to PDF Converter - Stirling PDF",+ "description": "Convert Markdown files into polished PDF documents. Free and private, right in your browser."+ },+ "/eml-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Email (EML) to PDF Converter - Stirling PDF",+ "description": "Convert email (EML) files into PDF documents. Free, fast, and private - no signup required."+ },+ "/file-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "File to PDF Converter - Stirling PDF",+ "description": "Convert Word, Excel, PowerPoint, and more into PDF documents. Free, fast, and private."+ },+ "/cbr-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "CBR to PDF Converter - Stirling PDF",+ "description": "Convert CBR comic book archives into PDF documents. Free and private, right in your browser."+ },+ "/pdf-to-cbr": {+ "image": "/og_images/convert.png",+ "title": "PDF to CBR Converter - Stirling PDF",+ "description": "Convert PDF documents into CBR comic book archives. Free and private."+ },+ "/cbz-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "CBZ to PDF Converter - Stirling PDF",+ "description": "Convert CBZ comic book archives into PDF documents. Free and private."+ },+ "/pdf-to-cbz": {+ "image": "/og_images/convert.png",+ "title": "PDF to CBZ Converter - Stirling PDF",+ "description": "Convert PDF documents into CBZ comic book archives. Free and private."}},"byPath": {@@ -650,21 +843,21 @@"/compress-pdf": "compress","/rotate-pdf": "rotate","/convert-pdf": "convert",- "/file-to-pdf": "convert",- "/eml-to-pdf": "convert",- "/html-to-pdf": "convert",- "/markdown-to-pdf": "convert",- "/pdf-to-csv": "convert",- "/pdf-to-xlsx": "convert",- "/pdf-to-img": "convert",- "/pdf-to-markdown": "convert",- "/pdf-to-pdfa": "convert",- "/pdf-to-word": "convert",- "/pdf-to-xml": "convert",- "/cbr-to-pdf": "convert",- "/pdf-to-cbr": "convert",- "/cbz-to-pdf": "convert",- "/pdf-to-cbz": "convert",+ "/file-to-pdf": "/file-to-pdf",+ "/eml-to-pdf": "/eml-to-pdf",+ "/html-to-pdf": "/html-to-pdf",+ "/markdown-to-pdf": "/markdown-to-pdf",+ "/pdf-to-csv": "/pdf-to-csv",+ "/pdf-to-xlsx": "/pdf-to-xlsx",+ "/pdf-to-img": "/pdf-to-img",+ "/pdf-to-markdown": "/pdf-to-markdown",+ "/pdf-to-pdfa": "/pdf-to-pdfa",+ "/pdf-to-word": "/pdf-to-word",+ "/pdf-to-xml": "/pdf-to-xml",+ "/cbr-to-pdf": "/cbr-to-pdf",+ "/pdf-to-cbr": "/pdf-to-cbr",+ "/cbz-to-pdf": "/cbz-to-pdf",+ "/pdf-to-cbz": "/pdf-to-cbz","/manage-signatures": "certSign","/remove-certificate-sign": "removeCertSign","/unlock-pdf-forms": "unlockPDFForms",@@ -681,10 +874,10 @@"/pdf-organizer": "reorganizePages","/multi-page-layout": "pageLayout","/extract-page": "extractPages",- "/img-to-pdf": "convert",- "/pdf-to-presentation": "convert",- "/pdf-to-text": "convert",- "/pdf-to-html": "convert",+ "/img-to-pdf": "/img-to-pdf",+ "/pdf-to-presentation": "/pdf-to-presentation",+ "/pdf-to-text": "/pdf-to-text",+ "/pdf-to-html": "/pdf-to-html","/auto-redact": "redact","/stamp": "addStamp","/view-pdf": "read",@@ -703,6 +896,13 @@"/mobile-scanner": "/mobile-scanner","/files": "/files","/settings": "/settings",+ "/docs": "/docs",+ "/processor": "/processor",+ "/processor/pipelines": "/processor/pipelines",+ "/processor/sources": "/processor/sources",+ "/processor/integrations": "/processor/integrations",+ "/processor/documents": "/processor/documents",+ "/processor/review": "/processor/review","/settings/preferences": "/settings/preferences","/settings/notifications": "/settings/notifications","/settings/connections": "/settings/connections",@@ -750,5 +950,355 @@"/settings/billing": "/settings/billing","/settings/audit": "/settings/audit","/settings/storage": "/settings/storage"- }+ },+ "canonicalByPath": {+ "/annotate": "/annotations",+ "/scanner-effect": "/fake-scan",+ "/pdf-to-single-page": "/single-large-page",+ "/remove-cert-sign": "/remove-certificate-sign",+ "/unlock-p-d-f-forms": "/unlock-pdf-forms",+ "/replace-color": "/replace-color-pdf",+ "/show-j-s": "/show-js",+ "/split-pdfs": "/split",+ "/merge-pdfs": "/merge",+ "/compress-pdf": "/compress",+ "/rotate-pdf": "/rotate",+ "/convert-pdf": "/convert",+ "/manage-signatures": "/cert-sign",+ "/sanitize-pdf": "/sanitize",+ "/ocr-pdf": "/ocr",+ "/add-watermark": "/watermark",+ "/auto-split-pdf": "/split",+ "/auto-size-split-pdf": "/split",+ "/pdf-organizer": "/reorganize-pages",+ "/multi-page-layout": "/page-layout",+ "/extract-page": "/extract-pages",+ "/auto-redact": "/redact",+ "/stamp": "/add-stamp",+ "/view-pdf": "/read",+ "/get-info-on-pdf": "/get-pdf-info",+ "/remove-image-pdf": "/remove-image",+ "/replace-and-invert-color-pdf": "/replace-color-pdf",+ "/pipeline": "/automate",+ "/extract-image-scans": "/scanner-image-split",+ "/show-javascript": "/show-js",+ "/split-by-size-or-count": "/split",+ "/overlay-pdf": "/overlay-pdfs",+ "/split-pdf-by-sections": "/split",+ "/split-pdf-by-chapters": "/split"+ },+ "navLinks": [+ {+ "path": "/add-attachments",+ "label": "Add Attachments to PDF"+ },+ {+ "path": "/add-image",+ "label": "Add Image to PDF"+ },+ {+ "path": "/add-page-numbers",+ "label": "Add Page Numbers to PDF"+ },+ {+ "path": "/add-stamp",+ "label": "Add Stamp to PDF"+ },+ {+ "path": "/add-text",+ "label": "Add Text to PDF"+ },+ {+ "path": "/watermark",+ "label": "Add Watermark to PDF"+ },+ {+ "path": "/adjust-contrast",+ "label": "Adjust PDF Colors and Contrast"+ },+ {+ "path": "/annotations",+ "label": "Annotate PDF"+ },+ {+ "path": "/auto-form-detection",+ "label": "Auto Form Detection"+ },+ {+ "path": "/auto-rename",+ "label": "Auto Rename PDF Files"+ },+ {+ "path": "/auto-rotate",+ "label": "Auto Rotate"+ },+ {+ "path": "/cbr-to-pdf",+ "label": "CBR to PDF Converter"+ },+ {+ "path": "/cbz-to-pdf",+ "label": "CBZ to PDF Converter"+ },+ {+ "path": "/change-permissions",+ "label": "Change PDF Permissions"+ },+ {+ "path": "/classify",+ "label": "Classify"+ },+ {+ "path": "/single-large-page",+ "label": "Combine PDF into a Single Page"+ },+ {+ "path": "/compare",+ "label": "Compare PDF Files"+ },+ {+ "path": "/compress",+ "label": "Compress PDF"+ },+ {+ "path": "/booklet-imposition",+ "label": "Create a PDF Booklet"+ },+ {+ "path": "/create-portfolio",+ "label": "Create Portfolio"+ },+ {+ "path": "/crop",+ "label": "Crop PDF"+ },+ {+ "path": "/remove-pages",+ "label": "Delete Pages from PDF"+ },+ {+ "path": "/edit-table-of-contents",+ "label": "Edit PDF Bookmarks"+ },+ {+ "path": "/change-metadata",+ "label": "Edit PDF Metadata"+ },+ {+ "path": "/pdf-text-editor",+ "label": "Edit PDF Text"+ },+ {+ "path": "/eml-to-pdf",+ "label": "Email (EML) to PDF Converter"+ },+ {+ "path": "/extract-images",+ "label": "Extract Images from PDF"+ },+ {+ "path": "/extract-pages",+ "label": "Extract PDF Pages"+ },+ {+ "path": "/file-to-pdf",+ "label": "File to PDF Converter"+ },+ {+ "path": "/form-fill",+ "label": "Fill PDF Forms"+ },+ {+ "path": "/flatten",+ "label": "Flatten PDF"+ },+ {+ "path": "/html-to-pdf",+ "label": "HTML to PDF Converter"+ },+ {+ "path": "/img-to-pdf",+ "label": "Image to PDF Converter"+ },+ {+ "path": "/fake-scan",+ "label": "Make a PDF Look Scanned"+ },+ {+ "path": "/markdown-to-pdf",+ "label": "Markdown to PDF Converter"+ },+ {+ "path": "/merge",+ "label": "Merge PDF"+ },+ {+ "path": "/ocr",+ "label": "OCR PDF"+ },+ {+ "path": "/reorganize-pages",+ "label": "Organize PDF Pages"+ },+ {+ "path": "/overlay-pdfs",+ "label": "Overlay PDFs"+ },+ {+ "path": "/add-password",+ "label": "Password Protect PDF"+ },+ {+ "path": "/convert",+ "label": "PDF Converter"+ },+ {+ "path": "/get-pdf-info",+ "label": "PDF Info and Metadata Viewer"+ },+ {+ "path": "/page-layout",+ "label": "PDF Multi-Page Layout"+ },+ {+ "path": "/multi-tool",+ "label": "PDF Page Editor"+ },+ {+ "path": "/pdf-to-cbr",+ "label": "PDF to CBR Converter"+ },+ {+ "path": "/pdf-to-cbz",+ "label": "PDF to CBZ Converter"+ },+ {+ "path": "/pdf-to-csv",+ "label": "PDF to CSV Converter"+ },+ {+ "path": "/pdf-to-xlsx",+ "label": "PDF to Excel Converter"+ },+ {+ "path": "/pdf-to-html",+ "label": "PDF to HTML Converter"+ },+ {+ "path": "/pdf-to-img",+ "label": "PDF to Image Converter"+ },+ {+ "path": "/pdf-to-markdown",+ "label": "PDF to Markdown Converter"+ },+ {+ "path": "/pdf-to-pdfa",+ "label": "PDF to PDF/A Converter"+ },+ {+ "path": "/pdf-to-presentation",+ "label": "PDF to PowerPoint Converter"+ },+ {+ "path": "/pdf-to-text",+ "label": "PDF to Text Converter"+ },+ {+ "path": "/pdf-to-word",+ "label": "PDF to Word Converter"+ },+ {+ "path": "/pdf-to-xml",+ "label": "PDF to XML Converter"+ },+ {+ "path": "/read",+ "label": "PDF Viewer"+ },+ {+ "path": "/automate",+ "label": "PDF Workflow Automation"+ },+ {+ "path": "/redact",+ "label": "Redact PDF"+ },+ {+ "path": "/remove-annotations",+ "label": "Remove Annotations from PDF"+ },+ {+ "path": "/remove-blanks",+ "label": "Remove Blank Pages from PDF"+ },+ {+ "path": "/remove-image",+ "label": "Remove Images from PDF"+ },+ {+ "path": "/remove-certificate-sign",+ "label": "Remove PDF Certificate Signature"+ },+ {+ "path": "/remove-password",+ "label": "Remove PDF Password"+ },+ {+ "path": "/repair",+ "label": "Repair PDF"+ },+ {+ "path": "/replace-color-pdf",+ "label": "Replace and Invert PDF Colors"+ },+ {+ "path": "/scale-pages",+ "label": "Resize PDF Pages"+ },+ {+ "path": "/rotate",+ "label": "Rotate PDF"+ },+ {+ "path": "/sanitize",+ "label": "Sanitize PDF"+ },+ {+ "path": "/shared-sign",+ "label": "Shared Signing"+ },+ {+ "path": "/show-js",+ "label": "Show JavaScript in PDF"+ },+ {+ "path": "/sign",+ "label": "Sign PDF"+ },+ {+ "path": "/cert-sign",+ "label": "Sign PDF with a Certificate"+ },+ {+ "path": "/split",+ "label": "Split PDF"+ },+ {+ "path": "/scanner-image-split",+ "label": "Split Scanned Photos"+ },+ {+ "path": "/timestamp-pdf",+ "label": "Timestamp PDF"+ },+ {+ "path": "/unlock-pdf-forms",+ "label": "Unlock PDF Forms"+ },+ {+ "path": "/validate-signature",+ "label": "Validate PDF Signature"+ }+ ]}diff --git a/frontend/editor/public/og-metadata.saas.json b/frontend/editor/public/og-metadata.saas.jsonindex b617e47e08..e6d1f52dfb 100644--- a/frontend/editor/public/og-metadata.saas.json+++ b/frontend/editor/public/og-metadata.saas.json@@ -8,12 +8,12 @@"byTool": {"certSign": {"image": "/og_images/certSign.png",- "title": "Certificate Sign - Stirling PDF",+ "title": "Sign PDF with a Certificate - Stirling PDF","description": "Sign PDF documents using digital certificates"},"sign": {"image": "/og_images/sign.png",- "title": "Sign - Stirling PDF",+ "title": "Sign PDF - Stirling PDF","description": "Adds signature to PDF by drawing, text or image"},"sharedSign": {@@ -23,82 +23,82 @@},"addText": {"image": "/og_images/add-text.png",- "title": "Add Text - Stirling PDF",+ "title": "Add Text to PDF - Stirling PDF","description": "Add custom text anywhere in your PDF"},"addPassword": {"image": "/og_images/add-password.png",- "title": "Add Password - Stirling PDF",+ "title": "Password Protect PDF - Stirling PDF","description": "Add password protection and restrictions to PDF files"},"removePassword": {"image": "/og_images/remove-password.png",- "title": "Remove Password - Stirling PDF",+ "title": "Remove PDF Password - Stirling PDF","description": "Remove password protection from PDF documents"},"removePages": {"image": "/og_images/remove.png",- "title": "Remove Pages - Stirling PDF",+ "title": "Delete Pages from PDF - Stirling PDF","description": "Remove specific pages from a PDF document"},"removeBlanks": {"image": "/og_images/remove-blank-pages.png",- "title": "Remove Blank Pages - Stirling PDF",+ "title": "Remove Blank Pages from PDF - Stirling PDF","description": "Remove blank pages from PDF documents"},"removeAnnotations": {"image": "/og_images/remove-annotations.png",- "title": "Remove Annotations - Stirling PDF",+ "title": "Remove Annotations from PDF - Stirling PDF","description": "Remove annotations and comments from PDF documents"},"removeImage": {"image": "/og_images/remove-image.png",- "title": "Remove Images - Stirling PDF",+ "title": "Remove Images from PDF - Stirling PDF","description": "Remove all images from a PDF document"},"changePermissions": {"image": "/og_images/change-permissions.png",- "title": "Change Permissions - Stirling PDF",+ "title": "Change PDF Permissions - Stirling PDF","description": "Change document restrictions and permissions"},"watermark": {"image": "/og_images/add-watermark.png",- "title": "Add Watermark - Stirling PDF",+ "title": "Add Watermark to PDF - Stirling PDF","description": "Add a custom watermark to your PDF document."},"sanitize": {"image": "/og_images/sanitize.png",- "title": "Sanitize - Stirling PDF",+ "title": "Sanitize PDF - Stirling PDF","description": "Remove potentially harmful elements from PDF files"},"split": {"image": "/og_images/split.png",- "title": "Split - Stirling PDF",+ "title": "Split PDF - Stirling PDF","description": "Split PDFs into multiple documents"},"merge": {"image": "/og_images/mergePdfs.png",- "title": "Merge - Stirling PDF",+ "title": "Merge PDF - Stirling PDF","description": "Merge multiple PDFs into a single document"},"convert": {"image": "/og_images/convert.png",- "title": "Convert - Stirling PDF",+ "title": "PDF Converter - Stirling PDF","description": "Convert files to and from PDF format"},"ocr": {"image": "/og_images/ocr.png",- "title": "OCR - Stirling PDF",+ "title": "OCR PDF - Stirling PDF","description": "Extract text from scanned PDFs using Optical Character Recognition"},"addImage": {"image": "/og_images/add-image.png",- "title": "Add Image - Stirling PDF",+ "title": "Add Image to PDF - Stirling PDF","description": "Add images anywhere in your PDF"},"rotate": {"image": "/og_images/rotate.png",- "title": "Rotate - Stirling PDF",+ "title": "Rotate PDF - Stirling PDF","description": "Easily rotate your PDFs."},"autoRotate": {@@ -108,42 +108,42 @@},"annotate": {"image": "/og_images/annotate.png",- "title": "Annotate - Stirling PDF",+ "title": "Annotate PDF - Stirling PDF","description": "Highlight, draw, add notes, and shapes directly in the viewer"},"scannerImageSplit": {"image": "/og_images/detect-split-scanned-photos.png",- "title": "Detect & Split Scanned Photos - Stirling PDF",+ "title": "Split Scanned Photos - Stirling PDF","description": "Detect and split scanned photos into separate pages"},"editTableOfContents": {"image": "/og_images/edit-table-of-contents.png",- "title": "Edit Table of Contents - Stirling PDF",+ "title": "Edit PDF Bookmarks - Stirling PDF","description": "Add or edit bookmarks and table of contents in PDF documents"},"scannerEffect": {"image": "/og_images/scanner-effect.png",- "title": "Scanner Effect - Stirling PDF",+ "title": "Make a PDF Look Scanned - Stirling PDF","description": "Create a PDF that looks like it was scanned"},"autoRename": {"image": "/og_images/auto-rename-pdf-file.png",- "title": "Auto Rename PDF File - Stirling PDF",+ "title": "Auto Rename PDF Files - Stirling PDF","description": "Automatically rename PDF files based on their content"},"pageLayout": {"image": "/og_images/multi-page-layout.png",- "title": "Multi-Page Layout - Stirling PDF",+ "title": "PDF Multi-Page Layout - Stirling PDF","description": "Merge multiple pages of a PDF document into a single page"},"scalePages": {"image": "/og_images/adjust-page-size-scale.png",- "title": "Adjust page size/scale - Stirling PDF",+ "title": "Resize PDF Pages - Stirling PDF","description": "Change the size/scale of a page and/or its contents."},"adjustContrast": {"image": "/og_images/adjust-colors-contrast.png",- "title": "Adjust Colors/Contrast - Stirling PDF",+ "title": "Adjust PDF Colors and Contrast - Stirling PDF","description": "Adjust colors and contrast of PDF documents"},"crop": {@@ -153,37 +153,37 @@},"pdfToSinglePage": {"image": "/og_images/single-large-page.png",- "title": "PDF to Single Large Page - Stirling PDF",+ "title": "Combine PDF into a Single Page - Stirling PDF","description": "Merges all PDF pages into one large single page"},"repair": {"image": "/og_images/repair.png",- "title": "Repair - Stirling PDF",+ "title": "Repair PDF - Stirling PDF","description": "Repair corrupted or damaged PDF files"},"compare": {"image": "/og_images/compare.png",- "title": "Compare - Stirling PDF",+ "title": "Compare PDF Files - Stirling PDF","description": "Compare two PDF documents and highlight differences"},"addPageNumbers": {"image": "/og_images/add-page-numbers.png",- "title": "Add Page Numbers - Stirling PDF",+ "title": "Add Page Numbers to PDF - Stirling PDF","description": "Add Page numbers throughout a document in a set location"},"redact": {"image": "/og_images/redact.png",- "title": "Redact - Stirling PDF",+ "title": "Redact PDF - Stirling PDF","description": "Permanently remove sensitive information from PDF documents"},"flatten": {"image": "/og_images/flatten.png",- "title": "Flatten - Stirling PDF",+ "title": "Flatten PDF - Stirling PDF","description": "Remove all interactive elements and forms from a PDF"},"removeCertSign": {"image": "/og_images/remove-certificate-sign.png",- "title": "Remove Certificate Sign - Stirling PDF",+ "title": "Remove PDF Certificate Signature - Stirling PDF","description": "Remove digital signature from PDF documents"},"unlockPDFForms": {@@ -193,7 +193,7 @@},"compress": {"image": "/og_images/compress.png",- "title": "Compress - Stirling PDF",+ "title": "Compress PDF - Stirling PDF","description": "Compress PDFs to reduce their file size."},"classify": {@@ -203,17 +203,17 @@},"extractPages": {"image": "/og_images/extract-pages.png",- "title": "Extract Pages - Stirling PDF",+ "title": "Extract PDF Pages - Stirling PDF","description": "Extract specific pages from a PDF document"},"reorganizePages": {"image": "/og_images/reorganize-pages.png",- "title": "Reorganize Pages - Stirling PDF",+ "title": "Organize PDF Pages - Stirling PDF","description": "Rearrange, duplicate, or delete PDF pages with visual drag-and-drop control."},"extractImages": {"image": "/og_images/extract-images.png",- "title": "Extract Images - Stirling PDF",+ "title": "Extract Images from PDF - Stirling PDF","description": "Extract images from PDF documents"},"addStamp": {@@ -223,7 +223,7 @@},"addAttachments": {"image": "/og_images/add-attachments.png",- "title": "Add Attachments - Stirling PDF",+ "title": "Add Attachments to PDF - Stirling PDF","description": "Add or remove embedded files (attachments) to/from a PDF"},"createPortfolio": {@@ -233,17 +233,17 @@},"changeMetadata": {"image": "/og_images/change-metadata.png",- "title": "Change Metadata - Stirling PDF",+ "title": "Edit PDF Metadata - Stirling PDF","description": "Change/Remove/Add metadata from a PDF document"},"overlayPdfs": {"image": "/og_images/overlay-pdfs.png",- "title": "Overlay Pdfs - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Overlay PDFs - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure."},"getPdfInfo": {"image": "/og_images/get-all-info-on-pdf.png",- "title": "Get ALL Info on PDF - Stirling PDF",+ "title": "PDF Info and Metadata Viewer - Stirling PDF","description": "Grabs any and all information possible on PDFs"},"validateSignature": {@@ -258,27 +258,27 @@},"replaceColor": {"image": "/og_images/replace-and-invert-color.png",- "title": "Replace & Invert Color - Stirling PDF",+ "title": "Replace and Invert PDF Colors - Stirling PDF","description": "Replace or invert colors in PDF documents"},"showJS": {"image": "/og_images/show-javascript.png",- "title": "Show JavaScript - Stirling PDF",+ "title": "Show JavaScript in PDF - Stirling PDF","description": "Extract and display JavaScript code from PDF documents"},"bookletImposition": {"image": "/og_images/booklet-imposition.png",- "title": "Booklet Imposition - Stirling PDF",+ "title": "Create a PDF Booklet - Stirling PDF","description": "Create booklets with proper page ordering and multi-page layout for printing and binding"},"pdfTextEditor": {"image": "/og_images/pdf-text-editor.png",- "title": "PDF Text Editor - Stirling PDF",+ "title": "Edit PDF Text - Stirling PDF","description": "Review and edit text and images in PDFs with grouped text editing and PDF regeneration"},"formFill": {"image": "/og_images/form-fill.png",- "title": "Form Editor - Stirling PDF",+ "title": "Fill PDF Forms - Stirling PDF","description": "Fill, create, edit, and delete PDF form fields with a visual editor"},"autoFormDetection": {@@ -288,38 +288,42 @@},"multiTool": {"image": "/og_images/multi-tool.png",- "title": "Multi-Tool - Stirling PDF",+ "title": "PDF Page Editor - Stirling PDF","description": "Use multiple tools on a single PDF document"},"read": {"image": "/og_images/read.png",- "title": "Read - Stirling PDF",+ "title": "PDF Viewer - Stirling PDF","description": "View and annotate PDFs. Highlight text, draw, or insert comments for review and collaboration."},"automate": {"image": "/og_images/automate.png",- "title": "Automate - Stirling PDF",+ "title": "PDF Workflow Automation - Stirling PDF","description": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."},"devApi": {"image": "/og_images/dev-api.png","title": "API - Stirling PDF",- "description": "Link to API documentation"+ "description": "Link to API documentation",+ "noindex": true},"devFolderScanning": {"image": "/og_images/dev-folder-scanning.png","title": "Automated Folder Scanning - Stirling PDF",- "description": "Link to automated folder scanning guide"+ "description": "Link to automated folder scanning guide",+ "noindex": true},"devSsoGuide": {"image": "/og_images/dev-sso-guide.png","title": "SSO Guide - Stirling PDF",- "description": "Link to SSO guide"+ "description": "Link to SSO guide",+ "noindex": true},"devAirgapped": {"image": "/og_images/dev-airgapped.png","title": "Air-gapped Setup - Stirling PDF",- "description": "Link to air-gapped setup guide"+ "description": "Link to air-gapped setup guide",+ "noindex": true},"/editor": {"image": "/og_images/saas/app-editor.png",@@ -330,268 +334,452 @@"/login": {"image": "/og_images/home.png","title": "Sign In - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/mobile-scanner": {"image": "/og_images/home.png","title": "Mobile Scanner - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/files": {"image": "/og_images/home.png","title": "Files - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings": {"image": "/og_images/home.png","title": "Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/docs": {+ "image": "/og_images/home.png",+ "title": "Documentation - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor": {+ "image": "/og_images/saas/app-processor.png",+ "title": "Stirling Processor - Govern every PDF your organization touches",+ "ogTitle": "Govern every PDF your organization touches",+ "description": "Redaction, retention, and encryption policies enforced everywhere PDFs enter your org. Distribute the free Editor anywhere. 1¢ per PDF.",+ "noOffer": true+ },+ "/processor/pipelines": {+ "image": "/og_images/home.png",+ "title": "Pipelines - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/sources": {+ "image": "/og_images/home.png",+ "title": "Sources - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/integrations": {+ "image": "/og_images/home.png",+ "title": "Integrations - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/documents": {+ "image": "/og_images/home.png",+ "title": "Documents - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/processor/review": {+ "image": "/og_images/home.png",+ "title": "Review - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/preferences": {"image": "/og_images/home.png","title": "Preferences Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/notifications": {"image": "/og_images/home.png","title": "Notifications Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/connections": {"image": "/og_images/home.png","title": "Connections Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/account": {"image": "/og_images/home.png","title": "Account Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/general": {"image": "/og_images/home.png","title": "General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/people": {"image": "/og_images/home.png","title": "People Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/teams": {"image": "/og_images/home.png","title": "Teams Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/security": {"image": "/og_images/home.png","title": "Security Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/identity": {"image": "/og_images/home.png","title": "Identity Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/plan": {"image": "/og_images/home.png","title": "Plan Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/payments": {"image": "/og_images/home.png","title": "Payments Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/requests": {"image": "/og_images/home.png","title": "Requests Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/developer": {"image": "/og_images/home.png","title": "Developer Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/api-keys": {"image": "/og_images/home.png",- "title": "Api Keys Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "API Keys Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/hotkeys": {"image": "/og_images/home.png","title": "Hotkeys Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminGeneral": {"image": "/og_images/home.png","title": "Admin General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminSecurity": {"image": "/og_images/home.png","title": "Admin Security Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminConnections": {"image": "/og_images/home.png","title": "Admin Connections Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPrivacy": {"image": "/og_images/home.png","title": "Admin Privacy Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminDatabase": {"image": "/og_images/home.png","title": "Admin Database Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAdvanced": {"image": "/og_images/home.png","title": "Admin Advanced Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminLegal": {"image": "/og_images/home.png","title": "Admin Legal Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPremium": {"image": "/og_images/home.png","title": "Admin Premium Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminFeatures": {"image": "/og_images/home.png","title": "Admin Features Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminPlan": {"image": "/og_images/home.png","title": "Admin Plan Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAudit": {"image": "/og_images/home.png","title": "Admin Audit Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminUsage": {"image": "/og_images/home.png","title": "Admin Usage Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminEndpoints": {"image": "/og_images/home.png","title": "Admin Endpoints Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminStorageSharing": {"image": "/og_images/home.png","title": "Admin Storage Sharing Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminFolderAccess": {"image": "/og_images/home.png","title": "Admin Folder Access Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminMcp": {"image": "/og_images/home.png",- "title": "Admin Mcp Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin MCP Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiGeneral": {"image": "/og_images/home.png",- "title": "Admin Ai General Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI General Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiModels": {"image": "/og_images/home.png",- "title": "Admin Ai Models Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Models Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiDocuments": {"image": "/og_images/home.png",- "title": "Admin Ai Documents Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Documents Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAiLimits": {"image": "/og_images/home.png",- "title": "Admin Ai Limits Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Limits Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/adminAi": {"image": "/og_images/home.png",- "title": "Admin Ai Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Admin AI Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/help": {"image": "/og_images/home.png","title": "Help Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/legal": {"image": "/og_images/home.png","title": "Legal Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/backendThirdPartyLicenses": {"image": "/og_images/home.png","title": "Backend Third Party Licenses Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/frontendThirdPartyLicenses": {"image": "/og_images/home.png","title": "Frontend Third Party Licenses Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/about": {"image": "/og_images/home.png","title": "About Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/payg": {"image": "/og_images/home.png",- "title": "Payg Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "title": "Pay As You Go Settings - Stirling PDF",+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/account-link": {"image": "/og_images/home.png","title": "Account Link Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/users": {"image": "/og_images/home.png","title": "Users Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/billing": {"image": "/og_images/home.png","title": "Billing Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/audit": {"image": "/og_images/home.png","title": "Audit Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true},"/settings/storage": {"image": "/og_images/home.png","title": "Storage Settings - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true+ },+ "/pdf-to-word": {+ "image": "/og_images/convert.png",+ "title": "PDF to Word Converter - Stirling PDF",+ "description": "Convert PDF files into editable Microsoft Word (DOCX) documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-xlsx": {+ "image": "/og_images/convert.png",+ "title": "PDF to Excel Converter - Stirling PDF",+ "description": "Convert PDF tables into editable Microsoft Excel (XLSX) spreadsheets. Free, fast, and private."+ },+ "/pdf-to-csv": {+ "image": "/og_images/convert.png",+ "title": "PDF to CSV Converter - Stirling PDF",+ "description": "Extract tables from PDF files into CSV data. Free, fast, and private - no signup required."+ },+ "/pdf-to-img": {+ "image": "/og_images/convert.png",+ "title": "PDF to Image Converter - Stirling PDF",+ "description": "Convert PDF pages into high-quality JPG or PNG images. Free and private, right in your browser."+ },+ "/pdf-to-presentation": {+ "image": "/og_images/convert.png",+ "title": "PDF to PowerPoint Converter - Stirling PDF",+ "description": "Convert PDF files into editable PowerPoint (PPTX) presentations. Free, fast, and private."+ },+ "/pdf-to-text": {+ "image": "/og_images/convert.png",+ "title": "PDF to Text Converter - Stirling PDF",+ "description": "Extract plain text from PDF documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-markdown": {+ "image": "/og_images/convert.png",+ "title": "PDF to Markdown Converter - Stirling PDF",+ "description": "Convert PDF documents into clean Markdown text. Free and private, right in your browser."+ },+ "/pdf-to-html": {+ "image": "/og_images/convert.png",+ "title": "PDF to HTML Converter - Stirling PDF",+ "description": "Convert PDF documents into HTML web pages. Free and private, right in your browser."+ },+ "/pdf-to-xml": {+ "image": "/og_images/convert.png",+ "title": "PDF to XML Converter - Stirling PDF",+ "description": "Convert PDF documents into structured XML. Free, fast, and private."+ },+ "/pdf-to-pdfa": {+ "image": "/og_images/convert.png",+ "title": "PDF to PDF/A Converter - Stirling PDF",+ "description": "Convert PDFs to the PDF/A archival standard for long-term preservation. Free and private."+ },+ "/img-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Image to PDF Converter - Stirling PDF",+ "description": "Convert JPG, PNG, and other images into a single PDF document. Free, fast, and private."+ },+ "/html-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "HTML to PDF Converter - Stirling PDF",+ "description": "Convert HTML files and web pages into PDF documents. Free, fast, and private."+ },+ "/markdown-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Markdown to PDF Converter - Stirling PDF",+ "description": "Convert Markdown files into polished PDF documents. Free and private, right in your browser."+ },+ "/eml-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "Email (EML) to PDF Converter - Stirling PDF",+ "description": "Convert email (EML) files into PDF documents. Free, fast, and private - no signup required."+ },+ "/file-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "File to PDF Converter - Stirling PDF",+ "description": "Convert Word, Excel, PowerPoint, and more into PDF documents. Free, fast, and private."+ },+ "/cbr-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "CBR to PDF Converter - Stirling PDF",+ "description": "Convert CBR comic book archives into PDF documents. Free and private, right in your browser."+ },+ "/pdf-to-cbr": {+ "image": "/og_images/convert.png",+ "title": "PDF to CBR Converter - Stirling PDF",+ "description": "Convert PDF documents into CBR comic book archives. Free and private."+ },+ "/cbz-to-pdf": {+ "image": "/og_images/convert.png",+ "title": "CBZ to PDF Converter - Stirling PDF",+ "description": "Convert CBZ comic book archives into PDF documents. Free and private."+ },+ "/pdf-to-cbz": {+ "image": "/og_images/convert.png",+ "title": "PDF to CBZ Converter - Stirling PDF",+ "description": "Convert PDF documents into CBZ comic book archives. Free and private."},"/signup": {"image": "/og_images/home.png","title": "Sign Up - Stirling PDF",- "description": "The Free Adobe Acrobat alternative (10M+ Downloads)"- },- "/processor": {- "image": "/og_images/saas/app-processor.png",- "title": "Stirling Processor - Govern every PDF your organization touches",- "ogTitle": "Govern every PDF your organization touches",- "description": "Redaction, retention, and encryption policies enforced everywhere PDFs enter your org. Distribute the free Editor anywhere. 1¢ per PDF."+ "description": "A free, private PDF editor you can run on any infrastructure.",+ "noindex": true}},"byPath": {@@ -663,21 +851,21 @@"/compress-pdf": "compress","/rotate-pdf": "rotate","/convert-pdf": "convert",- "/file-to-pdf": "convert",- "/eml-to-pdf": "convert",- "/html-to-pdf": "convert",- "/markdown-to-pdf": "convert",- "/pdf-to-csv": "convert",- "/pdf-to-xlsx": "convert",- "/pdf-to-img": "convert",- "/pdf-to-markdown": "convert",- "/pdf-to-pdfa": "convert",- "/pdf-to-word": "convert",- "/pdf-to-xml": "convert",- "/cbr-to-pdf": "convert",- "/pdf-to-cbr": "convert",- "/cbz-to-pdf": "convert",- "/pdf-to-cbz": "convert",+ "/file-to-pdf": "/file-to-pdf",+ "/eml-to-pdf": "/eml-to-pdf",+ "/html-to-pdf": "/html-to-pdf",+ "/markdown-to-pdf": "/markdown-to-pdf",+ "/pdf-to-csv": "/pdf-to-csv",+ "/pdf-to-xlsx": "/pdf-to-xlsx",+ "/pdf-to-img": "/pdf-to-img",+ "/pdf-to-markdown": "/pdf-to-markdown",+ "/pdf-to-pdfa": "/pdf-to-pdfa",+ "/pdf-to-word": "/pdf-to-word",+ "/pdf-to-xml": "/pdf-to-xml",+ "/cbr-to-pdf": "/cbr-to-pdf",+ "/pdf-to-cbr": "/pdf-to-cbr",+ "/cbz-to-pdf": "/cbz-to-pdf",+ "/pdf-to-cbz": "/pdf-to-cbz","/manage-signatures": "certSign","/remove-certificate-sign": "removeCertSign","/unlock-pdf-forms": "unlockPDFForms",@@ -694,10 +882,10 @@"/pdf-organizer": "reorganizePages","/multi-page-layout": "pageLayout","/extract-page": "extractPages",- "/img-to-pdf": "convert",- "/pdf-to-presentation": "convert",- "/pdf-to-text": "convert",- "/pdf-to-html": "convert",+ "/img-to-pdf": "/img-to-pdf",+ "/pdf-to-presentation": "/pdf-to-presentation",+ "/pdf-to-text": "/pdf-to-text",+ "/pdf-to-html": "/pdf-to-html","/auto-redact": "redact","/stamp": "addStamp","/view-pdf": "read",@@ -716,6 +904,13 @@"/mobile-scanner": "/mobile-scanner","/files": "/files","/settings": "/settings",+ "/docs": "/docs",+ "/processor": "/processor",+ "/processor/pipelines": "/processor/pipelines",+ "/processor/sources": "/processor/sources",+ "/processor/integrations": "/processor/integrations",+ "/processor/documents": "/processor/documents",+ "/processor/review": "/processor/review","/settings/preferences": "/settings/preferences","/settings/notifications": "/settings/notifications","/settings/connections": "/settings/connections",@@ -763,7 +958,356 @@"/settings/billing": "/settings/billing","/settings/audit": "/settings/audit","/settings/storage": "/settings/storage",- "/signup": "/signup",- "/processor": "/processor"- }+ "/signup": "/signup"+ },+ "canonicalByPath": {+ "/annotate": "/annotations",+ "/scanner-effect": "/fake-scan",+ "/pdf-to-single-page": "/single-large-page",+ "/remove-cert-sign": "/remove-certificate-sign",+ "/unlock-p-d-f-forms": "/unlock-pdf-forms",+ "/replace-color": "/replace-color-pdf",+ "/show-j-s": "/show-js",+ "/split-pdfs": "/split",+ "/merge-pdfs": "/merge",+ "/compress-pdf": "/compress",+ "/rotate-pdf": "/rotate",+ "/convert-pdf": "/convert",+ "/manage-signatures": "/cert-sign",+ "/sanitize-pdf": "/sanitize",+ "/ocr-pdf": "/ocr",+ "/add-watermark": "/watermark",+ "/auto-split-pdf": "/split",+ "/auto-size-split-pdf": "/split",+ "/pdf-organizer": "/reorganize-pages",+ "/multi-page-layout": "/page-layout",+ "/extract-page": "/extract-pages",+ "/auto-redact": "/redact",+ "/stamp": "/add-stamp",+ "/view-pdf": "/read",+ "/get-info-on-pdf": "/get-pdf-info",+ "/remove-image-pdf": "/remove-image",+ "/replace-and-invert-color-pdf": "/replace-color-pdf",+ "/pipeline": "/automate",+ "/extract-image-scans": "/scanner-image-split",+ "/show-javascript": "/show-js",+ "/split-by-size-or-count": "/split",+ "/overlay-pdf": "/overlay-pdfs",+ "/split-pdf-by-sections": "/split",+ "/split-pdf-by-chapters": "/split"+ },+ "navLinks": [+ {+ "path": "/add-attachments",+ "label": "Add Attachments to PDF"+ },+ {+ "path": "/add-image",+ "label": "Add Image to PDF"+ },+ {+ "path": "/add-page-numbers",+ "label": "Add Page Numbers to PDF"+ },+ {+ "path": "/add-stamp",+ "label": "Add Stamp to PDF"+ },+ {+ "path": "/add-text",+ "label": "Add Text to PDF"+ },+ {+ "path": "/watermark",+ "label": "Add Watermark to PDF"+ },+ {+ "path": "/adjust-contrast",+ "label": "Adjust PDF Colors and Contrast"+ },+ {+ "path": "/annotations",+ "label": "Annotate PDF"+ },+ {+ "path": "/auto-form-detection",+ "label": "Auto Form Detection"+ },+ {+ "path": "/auto-rename",+ "label": "Auto Rename PDF Files"+ },+ {+ "path": "/auto-rotate",+ "label": "Auto Rotate"+ },+ {+ "path": "/cbr-to-pdf",+ "label": "CBR to PDF Converter"+ },+ {+ "path": "/cbz-to-pdf",+ "label": "CBZ to PDF Converter"+ },+ {+ "path": "/change-permissions",+ "label": "Change PDF Permissions"+ },+ {+ "path": "/classify",+ "label": "Classify"+ },+ {+ "path": "/single-large-page",+ "label": "Combine PDF into a Single Page"+ },+ {+ "path": "/compare",+ "label": "Compare PDF Files"+ },+ {+ "path": "/compress",+ "label": "Compress PDF"+ },+ {+ "path": "/booklet-imposition",+ "label": "Create a PDF Booklet"+ },+ {+ "path": "/create-portfolio",+ "label": "Create Portfolio"+ },+ {+ "path": "/crop",+ "label": "Crop PDF"+ },+ {+ "path": "/remove-pages",+ "label": "Delete Pages from PDF"+ },+ {+ "path": "/edit-table-of-contents",+ "label": "Edit PDF Bookmarks"+ },+ {+ "path": "/change-metadata",+ "label": "Edit PDF Metadata"+ },+ {+ "path": "/pdf-text-editor",+ "label": "Edit PDF Text"+ },+ {+ "path": "/eml-to-pdf",+ "label": "Email (EML) to PDF Converter"+ },+ {+ "path": "/extract-images",+ "label": "Extract Images from PDF"+ },+ {+ "path": "/extract-pages",+ "label": "Extract PDF Pages"+ },+ {+ "path": "/file-to-pdf",+ "label": "File to PDF Converter"+ },+ {+ "path": "/form-fill",+ "label": "Fill PDF Forms"+ },+ {+ "path": "/flatten",+ "label": "Flatten PDF"+ },+ {+ "path": "/html-to-pdf",+ "label": "HTML to PDF Converter"+ },+ {+ "path": "/img-to-pdf",+ "label": "Image to PDF Converter"+ },+ {+ "path": "/fake-scan",+ "label": "Make a PDF Look Scanned"+ },+ {+ "path": "/markdown-to-pdf",+ "label": "Markdown to PDF Converter"+ },+ {+ "path": "/merge",+ "label": "Merge PDF"+ },+ {+ "path": "/ocr",+ "label": "OCR PDF"+ },+ {+ "path": "/reorganize-pages",+ "label": "Organize PDF Pages"+ },+ {+ "path": "/overlay-pdfs",+ "label": "Overlay PDFs"+ },+ {+ "path": "/add-password",+ "label": "Password Protect PDF"+ },+ {+ "path": "/convert",+ "label": "PDF Converter"+ },+ {+ "path": "/get-pdf-info",+ "label": "PDF Info and Metadata Viewer"+ },+ {+ "path": "/page-layout",+ "label": "PDF Multi-Page Layout"+ },+ {+ "path": "/multi-tool",+ "label": "PDF Page Editor"+ },+ {+ "path": "/pdf-to-cbr",+ "label": "PDF to CBR Converter"+ },+ {+ "path": "/pdf-to-cbz",+ "label": "PDF to CBZ Converter"+ },+ {+ "path": "/pdf-to-csv",+ "label": "PDF to CSV Converter"+ },+ {+ "path": "/pdf-to-xlsx",+ "label": "PDF to Excel Converter"+ },+ {+ "path": "/pdf-to-html",+ "label": "PDF to HTML Converter"+ },+ {+ "path": "/pdf-to-img",+ "label": "PDF to Image Converter"+ },+ {+ "path": "/pdf-to-markdown",+ "label": "PDF to Markdown Converter"+ },+ {+ "path": "/pdf-to-pdfa",+ "label": "PDF to PDF/A Converter"+ },+ {+ "path": "/pdf-to-presentation",+ "label": "PDF to PowerPoint Converter"+ },+ {+ "path": "/pdf-to-text",+ "label": "PDF to Text Converter"+ },+ {+ "path": "/pdf-to-word",+ "label": "PDF to Word Converter"+ },+ {+ "path": "/pdf-to-xml",+ "label": "PDF to XML Converter"+ },+ {+ "path": "/read",+ "label": "PDF Viewer"+ },+ {+ "path": "/automate",+ "label": "PDF Workflow Automation"+ },+ {+ "path": "/redact",+ "label": "Redact PDF"+ },+ {+ "path": "/remove-annotations",+ "label": "Remove Annotations from PDF"+ },+ {+ "path": "/remove-blanks",+ "label": "Remove Blank Pages from PDF"+ },+ {+ "path": "/remove-image",+ "label": "Remove Images from PDF"+ },+ {+ "path": "/remove-certificate-sign",+ "label": "Remove PDF Certificate Signature"+ },+ {+ "path": "/remove-password",+ "label": "Remove PDF Password"+ },+ {+ "path": "/repair",+ "label": "Repair PDF"+ },+ {+ "path": "/replace-color-pdf",+ "label": "Replace and Invert PDF Colors"+ },+ {+ "path": "/scale-pages",+ "label": "Resize PDF Pages"+ },+ {+ "path": "/rotate",+ "label": "Rotate PDF"+ },+ {+ "path": "/sanitize",+ "label": "Sanitize PDF"+ },+ {+ "path": "/shared-sign",+ "label": "Shared Signing"+ },+ {+ "path": "/show-js",+ "label": "Show JavaScript in PDF"+ },+ {+ "path": "/sign",+ "label": "Sign PDF"+ },+ {+ "path": "/cert-sign",+ "label": "Sign PDF with a Certificate"+ },+ {+ "path": "/split",+ "label": "Split PDF"+ },+ {+ "path": "/scanner-image-split",+ "label": "Split Scanned Photos"+ },+ {+ "path": "/timestamp-pdf",+ "label": "Timestamp PDF"+ },+ {+ "path": "/unlock-pdf-forms",+ "label": "Unlock PDF Forms"+ },+ {+ "path": "/validate-signature",+ "label": "Validate PDF Signature"+ }+ ]}diff --git a/frontend/editor/scripts/generate-og-metadata.mjs b/frontend/editor/scripts/generate-og-metadata.mjsindex 942bd9767e..0ff62d6306 100644--- a/frontend/editor/scripts/generate-og-metadata.mjs+++ b/frontend/editor/scripts/generate-og-metadata.mjs@@ -3,9 +3,10 @@// strings) plus the actual images in public/og_images.//// Outputs:-// src/core/data/ogImageMap.json - { toolId: imageBasename } (imported by the client)-// public/og-metadata.json - { default, byTool, byPath } (prerender input, all flavors)-// public/og-metadata.saas.json - same shape, SaaS marketing copy/art (prerender input, --mode saas)+// src/core/data/ogImageMap.json - { toolId: imageBasename } (imported by the client)+// src/core/data/urlSeoOverrides.json - { path: { title, description } } (client per-URL meta, English only)+// public/og-metadata.json - { default, byTool, byPath, canonicalByPath, navLinks } (prerender input)+// public/og-metadata.saas.json - same shape, SaaS marketing copy/art (prerender input, --mode saas)//// Run: `node scripts/generate-og-metadata.mjs` (writes files)// `node scripts/generate-og-metadata.mjs --check` (CI drift guard: fails if stale)@@ -23,10 +24,182 @@ const ROOT = path.resolve(HERE, "..");const read = (p) => fs.readFileSync(path.join(ROOT, p), "utf8");const SITE_NAME = "Stirling PDF";-const SITE_TITLE = "Stirling PDF";-const SITE_DESC = "The Free Adobe Acrobat alternative (10M+ Downloads)";+// SITE_TITLE is the home page's own title/social headline; SITE_NAME is the+// suffix every other page carries, so the download count appears once.+const SITE_TITLE = "Stirling PDF - 30M+ Downloads";+const SITE_DESC =+ "A free, private PDF editor you can run on any infrastructure.";const DEFAULT_IMAGE_BASENAME = "home";+// Keyword-targeted landing copy for the convert tool's URL aliases. Every+// /pdf-to-x and /x-to-pdf path routes to the single `convert` tool, so without+// this they would all share the generic "Convert - Stirling PDF" title and+// description - duplicate content that ranks for nothing. Each entry gets its+// own crawlable title/description (prerendered) and a client-side override so+// the SPA keeps the same title after hydration in English (other locales keep+// their translated copy). `name` is the keyword phrase; the app suffix+// (" - Stirling PDF" / the instance name) is added per surface.+const CONVERT_SEO_PAGES = {+ "/pdf-to-word": {+ name: "PDF to Word Converter",+ description:+ "Convert PDF files into editable Microsoft Word (DOCX) documents. Free, fast, and private - no signup or email required.",+ },+ "/pdf-to-xlsx": {+ name: "PDF to Excel Converter",+ description:+ "Convert PDF tables into editable Microsoft Excel (XLSX) spreadsheets. Free, fast, and private.",+ },+ "/pdf-to-csv": {+ name: "PDF to CSV Converter",+ description:+ "Extract tables from PDF files into CSV data. Free, fast, and private - no signup required.",+ },+ "/pdf-to-img": {+ name: "PDF to Image Converter",+ description:+ "Convert PDF pages into high-quality JPG or PNG images. Free and private, right in your browser.",+ },+ "/pdf-to-presentation": {+ name: "PDF to PowerPoint Converter",+ description:+ "Convert PDF files into editable PowerPoint (PPTX) presentations. Free, fast, and private.",+ },+ "/pdf-to-text": {+ name: "PDF to Text Converter",+ description:+ "Extract plain text from PDF documents. Free, fast, and private - no signup or email required.",+ },+ "/pdf-to-markdown": {+ name: "PDF to Markdown Converter",+ description:+ "Convert PDF documents into clean Markdown text. Free and private, right in your browser.",+ },+ "/pdf-to-html": {+ name: "PDF to HTML Converter",+ description:+ "Convert PDF documents into HTML web pages. Free and private, right in your browser.",+ },+ "/pdf-to-xml": {+ name: "PDF to XML Converter",+ description:+ "Convert PDF documents into structured XML. Free, fast, and private.",+ },+ "/pdf-to-pdfa": {+ name: "PDF to PDF/A Converter",+ description:+ "Convert PDFs to the PDF/A archival standard for long-term preservation. Free and private.",+ },+ "/img-to-pdf": {+ name: "Image to PDF Converter",+ description:+ "Convert JPG, PNG, and other images into a single PDF document. Free, fast, and private.",+ },+ "/html-to-pdf": {+ name: "HTML to PDF Converter",+ description:+ "Convert HTML files and web pages into PDF documents. Free, fast, and private.",+ },+ "/markdown-to-pdf": {+ name: "Markdown to PDF Converter",+ description:+ "Convert Markdown files into polished PDF documents. Free and private, right in your browser.",+ },+ "/eml-to-pdf": {+ name: "Email (EML) to PDF Converter",+ description:+ "Convert email (EML) files into PDF documents. Free, fast, and private - no signup required.",+ },+ "/file-to-pdf": {+ name: "File to PDF Converter",+ description:+ "Convert Word, Excel, PowerPoint, and more into PDF documents. Free, fast, and private.",+ },+ "/cbr-to-pdf": {+ name: "CBR to PDF Converter",+ description:+ "Convert CBR comic book archives into PDF documents. Free and private, right in your browser.",+ },+ "/pdf-to-cbr": {+ name: "PDF to CBR Converter",+ description:+ "Convert PDF documents into CBR comic book archives. Free and private.",+ },+ "/cbz-to-pdf": {+ name: "CBZ to PDF Converter",+ description:+ "Convert CBZ comic book archives into PDF documents. Free and private.",+ },+ "/pdf-to-cbz": {+ name: "PDF to CBZ Converter",+ description:+ "Convert PDF documents into CBZ comic book archives. Free and private.",+ },+};++// Keyword titles for base tools. The in-app label ("Compress") is the UI name,+// not the phrase people search ("Compress PDF"). Keyed by tool id; overrides the+// prerendered <title>, the crawlable H1, and the nav-hub label, and is fed to the+// running SPA (per alias) so the hydrated title matches. The in-app UI name is+// unaffected - it comes from the translation registry, not this file. The tool's+// own description is kept. Convert aliases are handled by CONVERT_SEO_PAGES.+const TOOL_SEO_TITLES = {+ compress: "Compress PDF",+ merge: "Merge PDF",+ split: "Split PDF",+ rotate: "Rotate PDF",+ convert: "PDF Converter",+ ocr: "OCR PDF",+ watermark: "Add Watermark to PDF",+ sign: "Sign PDF",+ certSign: "Sign PDF with a Certificate",+ redact: "Redact PDF",+ crop: "Crop PDF",+ flatten: "Flatten PDF",+ repair: "Repair PDF",+ compare: "Compare PDF Files",+ sanitize: "Sanitize PDF",+ addPassword: "Password Protect PDF",+ removePassword: "Remove PDF Password",+ changePermissions: "Change PDF Permissions",+ addPageNumbers: "Add Page Numbers to PDF",+ addText: "Add Text to PDF",+ addImage: "Add Image to PDF",+ addStamp: "Add Stamp to PDF",+ addAttachments: "Add Attachments to PDF",+ extractPages: "Extract PDF Pages",+ removePages: "Delete Pages from PDF",+ removeBlanks: "Remove Blank Pages from PDF",+ removeImage: "Remove Images from PDF",+ removeAnnotations: "Remove Annotations from PDF",+ reorganizePages: "Organize PDF Pages",+ extractImages: "Extract Images from PDF",+ pageLayout: "PDF Multi-Page Layout",+ scalePages: "Resize PDF Pages",+ pdfToSinglePage: "Combine PDF into a Single Page",+ adjustContrast: "Adjust PDF Colors and Contrast",+ replaceColor: "Replace and Invert PDF Colors",+ changeMetadata: "Edit PDF Metadata",+ getPdfInfo: "PDF Info and Metadata Viewer",+ overlayPdfs: "Overlay PDFs",+ editTableOfContents: "Edit PDF Bookmarks",+ pdfTextEditor: "Edit PDF Text",+ formFill: "Fill PDF Forms",+ multiTool: "PDF Page Editor",+ read: "PDF Viewer",+ annotate: "Annotate PDF",+ automate: "PDF Workflow Automation",+ scannerEffect: "Make a PDF Look Scanned",+ scannerImageSplit: "Split Scanned Photos",+ autoRename: "Auto Rename PDF Files",+ bookletImposition: "Create a PDF Booklet",+ unlockPDFForms: "Unlock PDF Forms",+ removeCertSign: "Remove PDF Certificate Signature",+ validateSignature: "Validate PDF Signature",+ timestampPdf: "Timestamp PDF",+ showJS: "Show JavaScript in PDF",+};+// SaaS (stirling.com) link-preview cards. Only the SaaS build (`--mode saas`)// uses og-metadata.saas.json; every other flavour keeps the tool-registry copy// above. `ogTitle` is the punchy social headline; `title` is the SEO <title>.@@ -46,6 +219,8 @@ const SAAS_ROUTE_OVERRIDES = {ogTitle: "Govern every PDF your organization touches",description:"Redaction, retention, and encryption policies enforced everywhere PDFs enter your org. Distribute the free Editor anywhere. 1¢ per PDF.",+ // Metered product - a price-0 Offer would contradict the page copy.+ noOffer: true,},"/editor": {image: "/og_images/saas/app-editor.png",@@ -152,9 +327,20 @@ for (const id of allIds) {image: `/og_images/${img || DEFAULT_IMAGE_BASENAME}.png`,title: titleFor(id),description: descFor(id),+ // Link tools are external redirects with no component, not landing pages.+ ...(linkIds.includes(id) ? { noindex: true } : {}),};}+// Upgrade base-tool titles to their search phrases (see TOOL_SEO_TITLES).+for (const id of Object.keys(TOOL_SEO_TITLES)) {+ if (!byTool[id]) {+ console.warn(`[og] TOOL_SEO_TITLES: unknown tool id "${id}" - skipped`);+ continue;+ }+ byTool[id].title = `${TOOL_SEO_TITLES[id]} - ${SITE_NAME}`;+}+// path -> toolId for every canonical path and every aliasconst byPath = {};for (const id of allIds) byPath[canonicalPath(id)] = id;@@ -186,20 +372,121 @@ const pageTitles = {"/mobile-scanner": "Mobile Scanner","/files": "Files","/settings": "Settings",+ "/docs": "Documentation",+ // Processor views per portal/ViewRouter. Its redirect-only paths+ // (/processor/users and friends, now settings) render nothing to label.+ "/processor": "Processor",+ "/processor/pipelines": "Pipelines",+ "/processor/sources": "Sources",+ "/processor/integrations": "Integrations",+ "/processor/documents": "Documents",+ "/processor/review": "Review",};-// Routes only the SaaS build serves - self-hosted has no signup page.+// Routes only the SaaS build serves - self-hosted redirects /signup to /login.const SAAS_ONLY_PAGE_TITLES = { "/signup": "Sign Up" };++// Nav keys humanizeLabel gets wrong: it title-cases acronyms, and one key is an+// initialism rather than words.+const NAV_KEY_LABELS = {+ "api-keys": "API Keys",+ adminMcp: "Admin MCP",+ adminAi: "Admin AI",+ adminAiGeneral: "Admin AI General",+ adminAiModels: "Admin AI Models",+ adminAiDocuments: "Admin AI Documents",+ adminAiLimits: "Admin AI Limits",+ payg: "Pay As You Go",+};for (const key of navKeys)- pageTitles[`/settings/${key}`] = `${humanizeLabel(key)} Settings`;+ pageTitles[`/settings/${key}`] =+ `${NAV_KEY_LABELS[key] ?? humanizeLabel(key)} Settings`;+// App surfaces, not landing pages: noindex keeps them out of the index and the+// sitemap. Docs and processor render client-side, so a shell would be thin.for (const [routePath, label] of Object.entries(pageTitles)) {byTool[routePath] = {image: `/og_images/${DEFAULT_IMAGE_BASENAME}.png`,title: `${label} - ${SITE_NAME}`,description: SITE_DESC,+ noindex: true,+ };+ byPath[routePath] = routePath;+}++// --- convert-alias SEO landing pages -----------------------------------------+// Give each convert alias its own keyword title/description instead of the+// generic "Convert" entry. Self-key in byPath so the prerender treats it as a+// distinct (self-canonical) page. `urlSeoOverrides` feeds the same copy to the+// running SPA so the hydrated title matches what crawlers first see.+const convertImage =+ byTool.convert?.image ?? `/og_images/${DEFAULT_IMAGE_BASENAME}.png`;+const urlSeoOverrides = {};+for (const [routePath, seo] of Object.entries(CONVERT_SEO_PAGES)) {+ byTool[routePath] = {+ image: convertImage,+ title: `${seo.name} - ${SITE_NAME}`,+ description: seo.description,};byPath[routePath] = routePath;+ urlSeoOverrides[routePath] = {+ title: seo.name,+ description: seo.description,+ };+}++// Base-tool keyword copy for the running SPA, on every alias of the tool, so the+// hydrated English <title> matches the prerendered one. Convert pages set above+// win (they have more specific per-alias keywords), hence the guard.+for (const [id, name] of Object.entries(TOOL_SEO_TITLES)) {+ if (!byTool[id]) continue;+ for (const p of [canonicalPath(id), ...(aliasesByTool[id] || [])])+ if (!(p in urlSeoOverrides))+ urlSeoOverrides[p] = { title: name, description: descFor(id) };+}++// --- crawlable internal-link hub --------------------------------------------+// One routable link per tool + each convert SEO landing page. The in-app+// toolbar uses onClick buttons (not <a href>), and the prerendered body is+// otherwise empty, so these baked links are the only tool links a crawler can+// follow - they spread link equity and help discovery. Paths are the first+// alias for each tool (guaranteed routable by parseToolRoute). Dev/link tools+// are external redirects, not landing pages, so they are excluded.+const stripSuffix = (t) =>+ t.endsWith(` - ${SITE_NAME}`) ? t.slice(0, -` - ${SITE_NAME}`.length) : t;+const primaryPathByTool = {};+for (const [p, id] of Object.entries(urlToTool))+ if (!(id in primaryPathByTool)) primaryPathByTool[id] = p;++const navLinks = [];+const seenNav = new Set();+const pushNav = (p, label) => {+ if (p && !seenNav.has(p)) {+ seenNav.add(p);+ navLinks.push({ path: p, label });+ }+};+for (const id of allIds) {+ if (linkIds.includes(id)) continue;+ pushNav(+ primaryPathByTool[id] || canonicalPath(id),+ stripSuffix(byTool[id].title),+ );+}+for (const [p, seo] of Object.entries(CONVERT_SEO_PAGES)) pushNav(p, seo.name);+navLinks.sort((a, b) => a.label.localeCompare(b.label));++// --- alias canonicalisation --------------------------------------------------+// Many paths route to the same tool (/compress-pdf and /compress). Indexing them+// all is duplicate content, so every alias canonicalises to the primary path the+// nav hub links to, and the prerender leaves aliases out of the sitemap. Paths+// keyed to themselves in byPath are landing pages with their own copy, so they+// stay primary.+const canonicalByPath = {};+for (const [p, id] of Object.entries(byPath)) {+ if (p === id) continue;+ const primary = primaryPathByTool[id] || canonicalPath(id);+ if (p !== primary) canonicalByPath[p] = primary;}const manifest = {@@ -210,20 +497,27 @@ const manifest = {},byTool,byPath,+ canonicalByPath,+ navLinks,};// SaaS manifest: same tool pages as above, but the home default and two extra// marketing routes carry the stirling.com cards. Keeps all per-tool OG intact.+// SaaS is the deploy with a canonical origin, so it needs the link hub most.const saasManifest = {default: SAAS_DEFAULT,byTool: { ...byTool },byPath: { ...byPath },+ canonicalByPath: { ...canonicalByPath },+ navLinks,};+// Same app-surface rule as the pageTitles loop above: noindex, never a landing page.for (const [routePath, label] of Object.entries(SAAS_ONLY_PAGE_TITLES)) {saasManifest.byTool[routePath] = {image: `/og_images/${DEFAULT_IMAGE_BASENAME}.png`,title: `${label} - ${SITE_NAME}`,description: SITE_DESC,+ noindex: true,};saasManifest.byPath[routePath] = routePath;}@@ -244,25 +538,27 @@ if (missingSaasImages.length)const mapJson = JSON.stringify(ogImageMap, null, 2) + "\n";const manifestJson = JSON.stringify(manifest, null, 2) + "\n";const saasManifestJson = JSON.stringify(saasManifest, null, 2) + "\n";+const seoOverridesJson = JSON.stringify(urlSeoOverrides, null, 2) + "\n";const mapPath = "src/core/data/ogImageMap.json";const manifestPath = "public/og-metadata.json";const saasManifestPath = "public/og-metadata.saas.json";+const seoOverridesPath = "src/core/data/urlSeoOverrides.json";++const outputs = [+ [mapPath, mapJson],+ [manifestPath, manifestJson],+ [saasManifestPath, saasManifestJson],+ [seoOverridesPath, seoOverridesJson],+];const check = process.argv.includes("--check");if (check) {- const stale = [];- if (!fs.existsSync(path.join(ROOT, mapPath)) || read(mapPath) !== mapJson)- stale.push(mapPath);- if (- !fs.existsSync(path.join(ROOT, manifestPath)) ||- read(manifestPath) !== manifestJson- )- stale.push(manifestPath);- if (- !fs.existsSync(path.join(ROOT, saasManifestPath)) ||- read(saasManifestPath) !== saasManifestJson- )- stale.push(saasManifestPath);+ const stale = outputs+ .filter(+ ([p, content]) =>+ !fs.existsSync(path.join(ROOT, p)) || read(p) !== content,+ )+ .map(([p]) => p);if (stale.length) {console.error("OG metadata is stale. Run `node scripts/generate-og-metadata.mjs`:\n " +@@ -272,9 +568,8 @@ if (check) {}console.log("OG metadata is up to date.");} else {- fs.writeFileSync(path.join(ROOT, mapPath), mapJson);- fs.writeFileSync(path.join(ROOT, manifestPath), manifestJson);- fs.writeFileSync(path.join(ROOT, saasManifestPath), saasManifestJson);+ for (const [p, content] of outputs)+ fs.writeFileSync(path.join(ROOT, p), content);console.log(`Wrote ${mapPath} (${Object.keys(ogImageMap).length} tools with art)`,);@@ -282,6 +577,9 @@ if (check) {`Wrote ${saasManifestPath} (${Object.keys(saasManifest.byPath).length} paths, SaaS)`,);console.log(`Wrote ${manifestPath} (${Object.keys(byPath).length} paths)`);+ console.log(+ `Wrote ${seoOverridesPath} (${Object.keys(urlSeoOverrides).length} SEO landing pages)`,+ );}// --- report -----------------------------------------------------------------diff --git a/frontend/editor/scripts/og-prerender.d.mts b/frontend/editor/scripts/og-prerender.d.mtsindex 27944e0347..53dce4bd8a 100644--- a/frontend/editor/scripts/og-prerender.d.mts+++ b/frontend/editor/scripts/og-prerender.d.mts@@ -4,23 +4,59 @@ export interface OgEntry {image: string;title: string;description: string;+ noindex?: boolean;+ /** Omit the price-0 Offer from JSON-LD (metered/paid surfaces). */+ noOffer?: boolean;/** Punchier social-card title; falls back to `title` for the <title> tag. */ogTitle?: string;}export interface OgInjectOptions {+ /** Absolute deploy root this build is served from ("" keeps URLs relative). */ogBase?: string;+ /** Absolute deploy root on the public origin; "" suppresses canonical/JSON-LD. */+ canonicalBase?: string;pageUrlPath?: string | null;+ canonicalPath?: string | null;+ noindex?: boolean;+ isHome?: boolean;+}++export interface OgNavLink {+ path: string;+ label: string;}export interface OgManifest {default: OgEntry;byTool: Record<string, OgEntry>;byPath: Record<string, string>;+ /** Alias path -> primary path it canonicalises to (aliases only). */+ canonicalByPath?: Record<string, string>;+ navLinks?: OgNavLink[];}export function escapeHtml(value: string): string;-export function buildOgTags(entry: OgEntry, opts?: OgInjectOptions): string;+export function resolveDeployBases(env: {+ canonicalOrigin?: string;+ deployOrigin?: string;+ baseHref?: string;+}): { ogBase: string; canonicalBase: string };+export function buildOgTags(+ entry: OgEntry,+ opts?: { ogBase?: string; pageUrlPath?: string | null },+): string;+export function buildRobotsTag(noindex: boolean): string;+export function buildCanonicalTag(canonicalUrl: string | null): string | null;+export function buildJsonLd(+ entry: OgEntry,+ opts: { siteRoot: string; pageUrl: string; isHome: boolean },+): string;+export function buildBodyContent(+ entry: OgEntry,+ opts?: { navLinks?: OgNavLink[]; heading?: string | null },+): string;+export function injectBody(html: string, content: string): string;export function injectOg(html: string,entry: OgEntry,@@ -30,5 +66,12 @@ export function prerenderOg(args: {distDir: string;manifest: OgManifest;ogBase?: string;+ canonicalBase?: string;baseHref?: string;+ /** Bake the crawlable landing body; only useful on public web deploys. */+ injectLanding?: boolean;}): Promise<number>;+export function buildSitemap(+ manifest: OgManifest,+ opts: { canonicalBase: string },+): string | null;diff --git a/frontend/editor/scripts/og-prerender.mjs b/frontend/editor/scripts/og-prerender.mjsindex 8fa7d274ac..662b7f9528 100644--- a/frontend/editor/scripts/og-prerender.mjs+++ b/frontend/editor/scripts/og-prerender.mjs@@ -1,10 +1,18 @@-// Pure helpers for baking Open Graph / Twitter Card tags into prerendered HTML.-// Kept separate from vite.config so the logic is unit-testable without a full build.+// Pure helpers for baking SEO metadata into prerendered HTML: Open Graph /+// Twitter Card tags, a canonical link, a robots directive, and JSON-LD+// structured data - plus an XML sitemap builder. Kept separate from+// vite.config so the logic is unit-testable without a full build.// Used by the `prerender-og` Vite plugin (see vite.config.ts).import fs from "node:fs/promises";import path from "node:path";+const SITE_NAME = "Stirling PDF";+const APP_SUFFIX = ` - ${SITE_NAME}`;+// Public project home - a safe, verifiable sameAs signal for structured data.+const GITHUB_URL = "https://github.com/Stirling-Tools/Stirling-PDF";+const LOGO_PATH = "/modern-logo/logo512.png";+export const escapeHtml = (value) =>String(value).replace(/&/g, "&")@@ -14,9 +22,50 @@ export const escapeHtml = (value) =>const absolute = (urlPath, ogBase) => (ogBase ? ogBase + urlPath : urlPath);+// Every injection point is matched against the built HTML shell, so a template+// edit that renames one would otherwise ship a whole site of unmodified shells+// while the build still reports success. Refuse the build instead.+const replaceOrThrow = (html, pattern, replacement, what) => {+ if (!pattern.test(html))+ throw new Error(+ `og-prerender: HTML shell has no ${what} to replace - the prerender ` ++ "and editor/index.html have drifted apart",+ );+ return html.replace(pattern, replacement);+};++/**+ * Resolve the two absolute deploy roots the prerender needs from the build+ * environment. Both already include any sub-path that applies to them.+ *+ * `canonicalOrigin` (VITE_OG_BASE_URL) is the public origin the site is meant to+ * be indexed under, and it serves the app at `baseHref` - so the sub-path+ * belongs in its URLs. `deployOrigin` (CF_PAGES_URL) names one deployment and+ * serves dist at its own root, so the sub-path must NOT be prepended there, and+ * nothing derived from it may be published as an indexing signal: a preview+ * deployment would otherwise canonicalise the entire site at a throwaway host.+ * @param {{canonicalOrigin?:string, deployOrigin?:string, baseHref?:string}} env+ * @returns {{ogBase:string, canonicalBase:string}}+ */+export function resolveDeployBases({+ canonicalOrigin = "",+ deployOrigin = "",+ baseHref = "/",+}) {+ const trim = (url) => url.replace(/\/+$/, "");+ const canonicalBase = canonicalOrigin+ ? trim(canonicalOrigin) + trim(baseHref)+ : "";+ return { ogBase: canonicalBase || trim(deployOrigin), canonicalBase };+}+/*** Build the OG/Twitter <meta> block for one route. `ogTitle` lets the social* card show a punchier headline than the (SEO) <title>; falls back to `title`.+ *+ * `ogBase` is the absolute URL of the deploy root, so every root-relative path+ * (`entry.image`, `pageUrlPath`) is appended to it verbatim. Callers must not+ * fold a sub-path in twice.* @param {{image:string,title:string,description:string,ogTitle?:string}} entry* @param {{ogBase?:string, pageUrlPath?:string|null}} opts*/@@ -42,32 +91,223 @@ export function buildOgTags(entry, { ogBase = "", pageUrlPath = null } = {}) {'<meta property="og:image:type" content="image/png" />','<meta property="og:image:width" content="1200" />','<meta property="og:image:height" content="630" />',+ `<meta property="og:image:alt" content="${title}" />`,'<meta name="twitter:card" content="summary_large_image" />',`<meta name="twitter:title" content="${title}" />`,`<meta name="twitter:description" content="${description}" />`,`<meta name="twitter:image" content="${image}" />`,"<!-- og:end -->",].filter(Boolean);- return lines.join("\n ") + "\n ";+ return lines.join("\n ");+}++/** Robots directive - keep app/auth pages out of the index, follow everywhere. */+export function buildRobotsTag(noindex) {+ return `<meta name="robots" content="${noindex ? "noindex, follow" : "index, follow"}" />`;+}++/** Canonical link (absolute). Null when no canonical origin is known. */+export function buildCanonicalTag(canonicalUrl) {+ return canonicalUrl+ ? `<link rel="canonical" href="${escapeHtml(canonicalUrl)}" />`+ : null;}-/** Inject route-specific <title>, description and OG/Twitter tags into an HTML shell. */+/**+ * Build a JSON-LD structured-data block. Home gets WebSite + Organization;+ * tool pages get a WebApplication plus a Home > Tool breadcrumb. Needs an+ * absolute origin, so callers only invoke it when a canonical base is known.+ * @param {{title:string,description:string,noOffer?:boolean}} entry+ * @param {{siteRoot:string, pageUrl:string, isHome:boolean}} opts+ */+export function buildJsonLd(entry, { siteRoot, pageUrl, isHome }) {+ const name = entry.title.endsWith(APP_SUFFIX)+ ? entry.title.slice(0, -APP_SUFFIX.length)+ : entry.title;+ const root = siteRoot.replace(/\/+$/, "");+ const organization = {+ "@type": "Organization",+ name: SITE_NAME,+ url: siteRoot,+ logo: root + LOGO_PATH,+ sameAs: [GITHUB_URL],+ };+ const graph = isHome+ ? [+ {+ "@type": "WebSite",+ name: SITE_NAME,+ url: siteRoot,+ description: entry.description,+ },+ organization,+ ]+ : [+ {+ "@type": "WebApplication",+ name,+ description: entry.description,+ url: pageUrl,+ applicationCategory: "BusinessApplication",+ operatingSystem: "All",+ browserRequirements: "Requires JavaScript. Requires HTML5.",+ // Manifest entries for metered products opt out (see noOffer).+ ...(entry.noOffer+ ? {}+ : {+ offers: { "@type": "Offer", price: "0", priceCurrency: "USD" },+ }),+ isPartOf: { "@type": "WebSite", name: SITE_NAME, url: siteRoot },+ publisher: organization,+ },+ {+ "@type": "BreadcrumbList",+ itemListElement: [+ { "@type": "ListItem", position: 1, name: "Home", item: siteRoot },+ { "@type": "ListItem", position: 2, name },+ ],+ },+ ];+ const json = JSON.stringify({+ "@context": "https://schema.org",+ "@graph": graph,+ });+ // Escape `<` so a value can never close the script element early.+ return `<script type="application/ld+json">${json.replace(/</g, "\\u003c")}</script>`;+}++/**+ * Inject route-specific SEO into an HTML shell: <title>, description, OG/Twitter+ * tags, a robots directive, and (when a canonical base is known) a canonical+ * link plus JSON-LD structured data.+ *+ * `ogBase` is the deploy root this build is served from; `canonicalBase` is the+ * deploy root on the public origin the site should be indexed under. They differ+ * on a preview deployment, where only `ogBase` is known - and an indexing signal+ * naming a preview host is worse than none, so canonical and JSON-LD are emitted+ * only with `canonicalBase`. Both paths are root-relative to their base.+ * @param {object} entry+ * @param {{ogBase?:string, canonicalBase?:string, pageUrlPath?:string|null,+ * canonicalPath?:string|null, noindex?:boolean, isHome?:boolean}} opts+ */export function injectOg(html, entry, opts = {}) {- return html- .replace(- /<title>[\s\S]*?<\/title>/i,- () => `<title>${escapeHtml(entry.title)}</title>`,- )- .replace(- /<meta\s+name=["']description["'][\s\S]*?>/i,- () =>- `<meta name="description" content="${escapeHtml(entry.description)}" />`,+ const {+ ogBase = "",+ canonicalBase = "",+ pageUrlPath = null,+ canonicalPath = null,+ noindex = false,+ isHome = false,+ } = opts;+ const canonicalUrl = canonicalBase+ ? canonicalBase + (canonicalPath ?? pageUrlPath ?? "/")+ : null;+ const blocks = [+ buildOgTags(entry, { ogBase, pageUrlPath }),+ buildRobotsTag(noindex),+ buildCanonicalTag(canonicalUrl),+ canonicalBase+ ? buildJsonLd(entry, {+ siteRoot: `${canonicalBase}/`,+ pageUrl: canonicalUrl,+ isHome,+ })+ : null,+ ].filter(Boolean);+ const head = blocks.join("\n ") + "\n ";+ const withTitle = replaceOrThrow(+ html,+ /<title>[\s\S]*?<\/title>/i,+ () => `<title>${escapeHtml(entry.title)}</title>`,+ "<title>",+ );+ const withDescription = replaceOrThrow(+ withTitle,+ /<meta\s+name=["']description["'][\s\S]*?>/i,+ () =>+ `<meta name="description" content="${escapeHtml(entry.description)}" />`,+ '<meta name="description">',+ );+ return replaceOrThrow(+ withDescription,+ /<\/head>/i,+ () => ` ${head}</head>`,+ "</head>",+ );+}++// Scoped styling for the prerendered body content so the pre-hydration paint+// (what crawlers see and the first visible paint for users) looks intentional.+// It lives inside #root and is wiped when React mounts.+const SEO_STYLE =+ "<style>.spdf-seo{max-width:760px;margin:0 auto;padding:56px 24px;" ++ "font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1a1a1a}" ++ ".spdf-seo h1{font-size:2rem;line-height:1.2;margin:0 0 .75rem}" ++ ".spdf-seo p{font-size:1.05rem;line-height:1.6;color:#444;margin:0 0 1rem}" ++ ".spdf-seo nav{margin-top:2.5rem}.spdf-seo nav h2{font-size:.95rem;" ++ "text-transform:uppercase;letter-spacing:.04em;color:#666;margin:0 0 .5rem}" ++ ".spdf-seo nav a{display:inline-block;margin:0 .75rem .35rem 0;" ++ "color:#0a58ca;text-decoration:none;font-size:.92rem}" ++ "@media(prefers-color-scheme:dark){.spdf-seo{color:#e8e8e8}" ++ ".spdf-seo p{color:#b8b8b8}.spdf-seo nav a{color:#6ea8fe}}</style>";++/**+ * Build the crawlable body content injected into #root: an H1, the page+ * description, and a hub of real <a href> links to every tool. React (createRoot)+ * replaces it on mount, so it only ever shows on a full page load - i.e. to+ * crawlers and as the first paint (which also helps LCP). Links are relative so+ * they resolve against <base href> under any deploy (root, /app, context path).+ * @param {{title:string,description:string}} entry+ * @param {{navLinks?:{path:string,label:string}[], heading?:string|null}} opts+ */+export function buildBodyContent(+ entry,+ { navLinks = [], heading = null } = {},+) {+ const name =+ heading ||+ (entry.title.endsWith(APP_SUFFIX)+ ? entry.title.slice(0, -APP_SUFFIX.length)+ : entry.title);+ const links = navLinks+ .map(+ (l) =>+ `<a href="${escapeHtml(l.path.replace(/^\//, ""))}">${escapeHtml(l.label)}</a>`,)- .replace("</head>", ` ${buildOgTags(entry, opts)}</head>`);+ .join("\n ");+ const nav = links+ ? `\n <nav aria-label="All PDF tools">\n <h2>All PDF tools</h2>\n ${links}\n </nav>`+ : "";+ return (+ `<div class="spdf-seo">${SEO_STYLE}\n ` ++ `<h1>${escapeHtml(name)}</h1>\n ` ++ `<p>${escapeHtml(entry.description)}</p>${nav}\n </div>`+ );+}++const ROOT_RE = /<div id="root">\s*<\/div>/;++/** Inject crawlable content into the (otherwise empty) React mount point. */+export function injectBody(html, content) {+ return replaceOrThrow(+ html,+ ROOT_RE,+ () => `<div id="root">${content}</div>`,+ 'empty <div id="root">',+ );}const BASE_HREF_RE = /<base\s+href="[^"]*"\s*\/?>/i;+// Clean single/multi-segment route (e.g. /compress, /settings/people); rejects+// traversal and dotted names. Returns the segment list or null.+function cleanSegments(routePath) {+ const segments = routePath.replace(/^\//, "").split("/");+ if (!segments.length || !segments.every((s) => /^[A-Za-z0-9_-]+$/.test(s)))+ return null;+ return segments;+}+/*** Write the root index.html (home preview) plus one file per route in the* manifest: flat for single-segment routes (e.g. dist/compress.html) and nested@@ -78,35 +318,73 @@ const BASE_HREF_RE = /<base\s+href="[^"]*"\s*\/?>/i;* need it because a relative `<base href="./">` would resolve their assets* against the sub-path (e.g. /settings/) and 404; flat files and the root keep* the build's relative base.+ *+ * `ogBase` and `canonicalBase` are absolute deploy roots (see injectOg) - any+ * sub-path already folded in by the caller, because only the caller knows+ * whether a given origin serves the app at the sub-path or at its own root.+ *+ * `injectLanding` bakes the crawlable landing body (see buildBodyContent). It is+ * only worth the pre-hydration flash on a crawlable public deploy, so callers+ * enable it only when a deploy origin is known.* @returns {Promise<number>}*/export async function prerenderOg({distDir,manifest,ogBase = "",+ canonicalBase = "",baseHref = "/",+ injectLanding = false,}) {const template = await fs.readFile(path.join(distDir, "index.html"), "utf8");+ const homePath = "/";+ const canonicalByPath = manifest.canonicalByPath || {};+ const navLinks = manifest.navLinks;+ // The hub is the only crawlable path to the tools, so an empty one is a stale+ // manifest, not a valid input - fail loudly instead of shipping a bare page.+ if (injectLanding && (!Array.isArray(navLinks) || navLinks.length === 0)) {+ throw new Error(+ "prerenderOg: manifest has no navLinks - run scripts/generate-og-metadata.mjs",+ );+ }- await fs.writeFile(- path.join(distDir, "index.html"),- injectOg(template, manifest.default, {- ogBase,- pageUrlPath: ogBase ? "/" : null,- }),- );+ let home = injectOg(template, manifest.default, {+ ogBase,+ canonicalBase,+ pageUrlPath: ogBase ? homePath : null,+ canonicalPath: homePath,+ isHome: true,+ });+ // Home <title> stays the brand ("Stirling PDF"); the H1 targets the keyword.+ if (injectLanding) {+ home = injectBody(+ home,+ buildBodyContent(manifest.default, {+ navLinks,+ heading: "Free Online PDF Tools",+ }),+ );+ }+ await fs.writeFile(path.join(distDir, "index.html"), home);let count = 0;for (const [routePath, id] of Object.entries(manifest.byPath || {})) {- const segments = routePath.replace(/^\//, "").split("/");- // Clean segments only - no traversal, no dots (e.g. /compress, /settings/people).- if (!segments.length || !segments.every((s) => /^[A-Za-z0-9_-]+$/.test(s)))- continue;+ const segments = cleanSegments(routePath);+ if (!segments) continue;const entry = manifest.byTool[id] ?? manifest.default;+ // Aliases point at their primary URL so the duplicates are not indexed.+ const canonicalRoute = canonicalByPath[routePath] || routePath;let html = injectOg(template, entry, {ogBase,+ canonicalBase,pageUrlPath: ogBase ? routePath : null,+ canonicalPath: canonicalRoute,+ noindex: !!entry.noindex,+ isHome: false,});+ // App/auth pages (noindex) stay the bare shell - no crawlable landing copy.+ if (injectLanding && !entry.noindex)+ html = injectBody(html, buildBodyContent(entry, { navLinks }));const nested = segments.length > 1;if (nested)html = html.replace(BASE_HREF_RE, `<base href="${baseHref}" />`);@@ -117,3 +395,47 @@ export async function prerenderOg({}return count;}++/**+ * Build an XML sitemap of every indexable route. A sitemap is an instruction to+ * index the URLs it lists, so it takes the canonical deploy root (absolute, any+ * sub-path already folded in) and returns null when none is known - self-hosted+ * builds and preview deployments emit nothing rather than a sitemap of a host+ * that should never be indexed. Noindex routes and aliases that canonicalise+ * elsewhere are excluded.+ * @param {object} manifest+ * @param {{canonicalBase:string}} opts+ * @returns {string|null}+ */+export function buildSitemap(manifest, { canonicalBase }) {+ if (!canonicalBase) return null;+ const canonicalByPath = manifest.canonicalByPath || {};+ const locs = new Set([`${canonicalBase}/`]);+ for (const [routePath, id] of Object.entries(manifest.byPath || {})) {+ if (!cleanSegments(routePath)) continue;+ // An alias is a duplicate of its primary URL - only the primary is listed.+ if (canonicalByPath[routePath]) continue;+ const entry = manifest.byTool[id] ?? manifest.default;+ if (entry.noindex) continue;+ locs.add(canonicalBase + routePath);+ }+ const body = [...locs]+ .sort()+ .map((loc) => {+ const priority = loc === `${canonicalBase}/` ? "1.0" : "0.8";+ return (+ ` <url>\n` ++ ` <loc>${escapeHtml(loc)}</loc>\n` ++ ` <changefreq>weekly</changefreq>\n` ++ ` <priority>${priority}</priority>\n` ++ ` </url>`+ );+ })+ .join("\n");+ return (+ `<?xml version="1.0" encoding="UTF-8"?>\n` ++ `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n` ++ `${body}\n` ++ `</urlset>\n`+ );+}diff --git a/frontend/editor/src/core/data/ogMetadata.test.ts b/frontend/editor/src/core/data/ogMetadata.test.tsindex dd19737d46..f22e853199 100644--- a/frontend/editor/src/core/data/ogMetadata.test.ts+++ b/frontend/editor/src/core/data/ogMetadata.test.ts@@ -1,14 +1,21 @@import fs from "node:fs/promises";import os from "node:os";import path from "node:path";+import { fileURLToPath } from "node:url";import { describe, expect, it } from "vitest";import { getToolOgImage } from "@app/data/ogImage";+import { CORE_LINK_TOOL_IDS } from "@app/types/toolId";// Build tooling (plain ESM, node:fs only) - import the helpers for coverage.// oxlint-disable-next-line no-restricted-imports -- build script lives outside the @app alias rootimport {+ buildBodyContent,+ buildJsonLd,buildOgTags,+ buildSitemap,+ injectBody,injectOg,prerenderOg,+ resolveDeployBases,} from "../../../scripts/og-prerender.mjs";const TEMPLATE = `<!doctype html>@@ -18,7 +25,7 @@ const TEMPLATE = `<!doctype html><title>Stirling PDF</title><metaname="description"- content="The Free Adobe Acrobat alternative (10M+ Downloads)"+ content="A free, private PDF editor you can run on any infrastructure."/><script type="module" src="/assets/index-abc.js"></script></head>@@ -103,6 +110,29 @@ describe("injectOg (build-time prerender)", () => {expect(tags).toContain("A "B" & <C>");});+ it("hangs asset URLs off the deploy root exactly as given", () => {+ // The caller folds any sub-path into ogBase, because only it knows whether+ // an origin serves the app at the sub-path or at its own root.+ const subpath = buildOgTags(entry, {+ ogBase: "https://stirling.com/app",+ pageUrlPath: "/compress",+ });+ expect(subpath).toContain(+ '<meta property="og:image" content="https://stirling.com/app/og_images/compress.png" />',+ );+ expect(subpath).toContain(+ '<meta name="twitter:image" content="https://stirling.com/app/og_images/compress.png" />',+ );++ const originRoot = buildOgTags(entry, {+ ogBase: "https://abc123.stirling-pdf.pages.dev",+ pageUrlPath: "/compress",+ });+ expect(originRoot).toContain(+ '<meta property="og:image" content="https://abc123.stirling-pdf.pages.dev/og_images/compress.png" />',+ );+ });+it("uses ogTitle for the social card but title for the <title> tag", () => {const out = injectOg(TEMPLATE,@@ -126,6 +156,309 @@ describe("injectOg (build-time prerender)", () => {});});+describe("injectOg SEO extras (robots, canonical, JSON-LD)", () => {+ const entry = {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "Compress PDFs to reduce their file size.",+ };++ it("always emits a robots directive, indexable by default", () => {+ const out = injectOg(TEMPLATE, entry, {});+ expect(out).toContain('<meta name="robots" content="index, follow" />');+ });++ it("emits noindex when the entry is flagged", () => {+ const out = injectOg(TEMPLATE, entry, { noindex: true });+ expect(out).toContain('<meta name="robots" content="noindex, follow" />');+ });++ it("omits canonical + JSON-LD when no canonical origin is known", () => {+ const out = injectOg(TEMPLATE, entry, { ogBase: "", pageUrlPath: "/x" });+ expect(out).not.toContain('rel="canonical"');+ expect(out).not.toContain("application/ld+json");+ });++ it("emits an absolute self-canonical and WebApplication JSON-LD with a base", () => {+ const out = injectOg(TEMPLATE, entry, {+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ pageUrlPath: "/compress",+ canonicalPath: "/compress",+ });+ expect(out).toContain(+ '<link rel="canonical" href="https://stirling.com/compress" />',+ );+ expect(out).toContain('<script type="application/ld+json">');+ expect(out).toContain('"@type":"WebApplication"');+ expect(out).toContain('"@type":"BreadcrumbList"');+ });++ it("omits the price-0 Offer when the entry opts out (metered surfaces)", () => {+ const opts = {+ siteRoot: "https://stirling.com/",+ pageUrl: "https://stirling.com/processor",+ isHome: false,+ };+ expect(buildJsonLd(entry, opts)).toContain('"price":"0"');+ expect(buildJsonLd({ ...entry, noOffer: true }, opts)).not.toContain(+ '"offers"',+ );+ });++ it("escapes '<' inside JSON-LD so a value cannot close the script early", () => {+ const out = injectOg(+ TEMPLATE,+ { ...entry, title: "A <script> B - Stirling PDF" },+ {+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ pageUrlPath: "/x",+ },+ );+ const ldStart = out.indexOf("application/ld+json");+ const ld = out.slice(ldStart, out.indexOf("</script>", ldStart));+ // '<' is escaped (breakout-proof); '>' need not be.+ expect(ld).not.toContain("<script");+ expect(ld).toContain("\\u003cscript");+ });++ it("canonical can point somewhere other than the page URL (alias dedupe)", () => {+ const out = injectOg(TEMPLATE, entry, {+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ pageUrlPath: "/compress-pdf",+ canonicalPath: "/compress",+ });+ expect(out).toContain(+ '<link rel="canonical" href="https://stirling.com/compress" />',+ );+ });+});++describe("buildSitemap", () => {+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "d",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ "/settings/people": {+ image: "/og_images/home.png",+ title: "People Settings - Stirling PDF",+ description: "p",+ noindex: true,+ },+ },+ byPath: {+ "/compress": "compress",+ "/compress-pdf": "compress",+ "/settings/people": "/settings/people",+ },+ canonicalByPath: { "/compress-pdf": "/compress" },+ };++ it("returns null without a canonical origin (sitemaps need absolute URLs)", () => {+ expect(buildSitemap(manifest, { canonicalBase: "" })).toBeNull();+ });++ it("lists indexable routes as absolute URLs and excludes noindex ones", () => {+ const xml = buildSitemap(manifest, {+ canonicalBase: "https://stirling.com",+ });+ expect(xml).toContain("<loc>https://stirling.com/</loc>");+ expect(xml).toContain("<loc>https://stirling.com/compress</loc>");+ expect(xml).not.toContain("/settings/people");+ expect(xml).toContain('<?xml version="1.0" encoding="UTF-8"?>');+ expect(xml).toContain("<urlset");+ });++ it("keeps the sub-path the canonical base carries", () => {+ const xml = buildSitemap(manifest, {+ canonicalBase: "https://stirling.com/app",+ });+ expect(xml).toContain("<loc>https://stirling.com/app/</loc>");+ expect(xml).toContain("<loc>https://stirling.com/app/compress</loc>");+ });++ it("omits aliases that canonicalise to another URL (no duplicate content)", () => {+ const xml = buildSitemap(manifest, {+ canonicalBase: "https://stirling.com",+ });+ expect(xml).not.toContain("/compress-pdf");+ expect(xml).toContain("<loc>https://stirling.com/compress</loc>");+ });+});++describe("buildBodyContent + injectBody (crawlable landing content)", () => {+ const entry = {+ image: "/og_images/compress.png",+ title: "PDF to Word Converter - Stirling PDF",+ description: "Convert PDF files into editable Word documents.",+ };+ const navLinks = [+ { path: "/compress", label: "Compress" },+ { path: "/merge", label: "Merge" },+ ];++ it("emits an H1 (keyword, suffix stripped), the description, and relative tool links", () => {+ const body = buildBodyContent(entry, { navLinks });+ expect(body).toContain("<h1>PDF to Word Converter</h1>");+ expect(body).toContain(+ "<p>Convert PDF files into editable Word documents.</p>",+ );+ // links are relative (no leading slash) so they resolve against <base href>+ expect(body).toContain('<a href="compress">Compress</a>');+ expect(body).toContain('<a href="merge">Merge</a>');+ expect(body).not.toContain('href="/compress"');+ });++ it("uses an explicit heading override for the H1 when given", () => {+ const body = buildBodyContent(entry, {+ navLinks,+ heading: "Free Online PDF Tools",+ });+ expect(body).toContain("<h1>Free Online PDF Tools</h1>");+ expect(body).not.toContain("<h1>PDF to Word Converter</h1>");+ });++ it("escapes HTML in the H1/description", () => {+ const body = buildBodyContent(+ { ...entry, title: "A & <B>", description: 'x "y"' },+ { navLinks: [] },+ );+ expect(body).toContain("<h1>A & <B></h1>");+ expect(body).toContain("x "y"");+ });++ it("injectBody fills the empty React mount point", () => {+ const out = injectBody(+ '<body><div id="root"></div><script></script></body>',+ "<h1>hi</h1>",+ );+ expect(out).toContain('<div id="root"><h1>hi</h1></div>');+ });++ it("prerenderOg injects landing content on indexable pages but not noindex ones", async () => {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-body-"));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ "/settings/people": {+ image: "/og_images/home.png",+ title: "People Settings - Stirling PDF",+ description: "p",+ noindex: true,+ },+ },+ byPath: {+ "/compress": "compress",+ "/settings/people": "/settings/people",+ },+ navLinks: [{ path: "/compress", label: "Compress" }],+ };++ await prerenderOg({+ distDir: dir,+ manifest,+ ogBase: "",+ baseHref: "/",+ injectLanding: true,+ });++ const compress = await fs.readFile(path.join(dir, "compress.html"), "utf8");+ expect(compress).toContain('<div id="root"><div class="spdf-seo">');+ expect(compress).toContain("<h1>Compress</h1>");++ const settings = await fs.readFile(+ path.join(dir, "settings", "people.html"),+ "utf8",+ );+ expect(settings).toContain('<div id="root"></div>'); // noindex: bare shell++ const home = await fs.readFile(path.join(dir, "index.html"), "utf8");+ expect(home).toContain("spdf-seo");++ await fs.rm(dir, { recursive: true, force: true });+ });++ it("leaves the mount point empty when landing content is off (self-hosted)", async () => {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-nobody-"));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ },+ byPath: { "/compress": "compress" },+ navLinks: [{ path: "/compress", label: "Compress" }],+ };++ await prerenderOg({ distDir: dir, manifest, ogBase: "", baseHref: "/" });++ const compress = await fs.readFile(path.join(dir, "compress.html"), "utf8");+ expect(compress).toContain('<div id="root"></div>');+ expect(compress).not.toContain("spdf-seo");+ // OG/title metadata is still baked in - only the visible body is skipped.+ expect(compress).toContain("<title>Compress - Stirling PDF</title>");++ const home = await fs.readFile(path.join(dir, "index.html"), "utf8");+ expect(home).not.toContain("spdf-seo");++ await fs.rm(dir, { recursive: true, force: true });+ });++ it("refuses to bake landing content from a manifest with no navLinks", async () => {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-nonav-"));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {},+ byPath: {},+ };++ await expect(+ prerenderOg({+ distDir: dir,+ manifest,+ ogBase: "https://stirling.com",+ baseHref: "/",+ injectLanding: true,+ }),+ ).rejects.toThrow(/navLinks/);++ await fs.rm(dir, { recursive: true, force: true });+ });+});+describe("prerenderOg (flat + nested route files)", () => {it("writes a flat file per single-segment route and a nested file (absolute base) per sub-route", async () => {const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-prerender-"));@@ -177,4 +510,416 @@ describe("prerenderOg (flat + nested route files)", () => {await fs.rm(dir, { recursive: true, force: true });});++ it("canonicalises alias routes at their primary URL", async () => {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-alias-"));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "d",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ },+ byPath: { "/compress": "compress", "/compress-pdf": "compress" },+ canonicalByPath: { "/compress-pdf": "/compress" },+ };++ await prerenderOg({+ distDir: dir,+ manifest,+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ baseHref: "/",+ });++ const alias = await fs.readFile(+ path.join(dir, "compress-pdf.html"),+ "utf8",+ );+ expect(alias).toContain(+ '<link rel="canonical" href="https://stirling.com/compress" />',+ );+ // og:url still names the page itself, only the canonical dedupes.+ expect(alias).toContain(+ '<meta property="og:url" content="https://stirling.com/compress-pdf" />',+ );++ const primary = await fs.readFile(path.join(dir, "compress.html"), "utf8");+ expect(primary).toContain(+ '<link rel="canonical" href="https://stirling.com/compress" />',+ );++ await fs.rm(dir, { recursive: true, force: true });+ });++ it("gives the home shell WebSite JSON-LD and flags noindex routes with a base", async () => {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-prerender-"));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {+ "/login": {+ image: "/og_images/home.png",+ title: "Sign In - Stirling PDF",+ description: "l",+ noindex: true,+ },+ },+ byPath: { "/login": "/login" },+ };++ await prerenderOg({+ distDir: dir,+ manifest,+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ baseHref: "/",+ });++ const home = await fs.readFile(path.join(dir, "index.html"), "utf8");+ expect(home).toContain('"@type":"WebSite"');+ expect(home).toContain(+ '<link rel="canonical" href="https://stirling.com/"',+ );++ const login = await fs.readFile(path.join(dir, "login.html"), "utf8");+ expect(login).toContain('content="noindex, follow"');++ await fs.rm(dir, { recursive: true, force: true });+ });+});++describe("resolveDeployBases (which origin may be published)", () => {+ it("prefixes only the canonical origin with the deploy sub-path", () => {+ expect(+ resolveDeployBases({+ canonicalOrigin: "https://stirling.com/",+ deployOrigin: "https://abc123.stirling-pdf.pages.dev",+ baseHref: "/app/",+ }),+ ).toEqual({+ ogBase: "https://stirling.com/app",+ canonicalBase: "https://stirling.com/app",+ });+ });++ it("serves a per-deployment origin from its own root and never canonicalises there", () => {+ expect(+ resolveDeployBases({+ deployOrigin: "https://abc123.stirling-pdf.pages.dev/",+ baseHref: "/app/",+ }),+ ).toEqual({+ ogBase: "https://abc123.stirling-pdf.pages.dev",+ canonicalBase: "",+ });+ });++ it("has no absolute base at all when neither origin is set (self-hosted)", () => {+ expect(resolveDeployBases({ baseHref: "/" })).toEqual({+ ogBase: "",+ canonicalBase: "",+ });+ });+});++describe("prerenderOg on a sub-path deploy", () => {+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ },+ byPath: { "/compress": "compress" },+ navLinks: [{ path: "/compress", label: "Compress" }],+ };++ const run = async (+ env: Parameters<typeof resolveDeployBases>[0],+ prefix: string,+ ) => {+ const bases = resolveDeployBases(env);+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), prefix));+ await fs.writeFile(path.join(dir, "index.html"), TEMPLATE);+ await prerenderOg({+ distDir: dir,+ manifest,+ ogBase: bases.ogBase,+ canonicalBase: bases.canonicalBase,+ baseHref: env.baseHref,+ injectLanding: true,+ });+ const html = await fs.readFile(path.join(dir, "compress.html"), "utf8");+ await fs.rm(dir, { recursive: true, force: true });+ return { html, bases };+ };++ it("keeps assets at the deployment's own root and publishes no indexing signal", async () => {+ const { html, bases } = await run(+ {+ deployOrigin: "https://abc123.stirling-pdf.pages.dev",+ baseHref: "/app/",+ },+ "og-preview-",+ );+ expect(html).toContain(+ '<meta property="og:image" content="https://abc123.stirling-pdf.pages.dev/og_images/compress.png" />',+ );+ expect(html).not.toContain("/app/og_images");+ expect(html).not.toContain('rel="canonical"');+ expect(html).not.toContain("application/ld+json");+ expect(buildSitemap(manifest, bases)).toBeNull();+ });++ it("weaves the sub-path in once the public origin is configured", async () => {+ const { html, bases } = await run(+ {+ canonicalOrigin: "https://stirling.com",+ deployOrigin: "https://abc123.stirling-pdf.pages.dev",+ baseHref: "/app/",+ },+ "og-canonical-",+ );+ expect(html).toContain(+ '<meta property="og:image" content="https://stirling.com/app/og_images/compress.png" />',+ );+ expect(html).toContain(+ '<link rel="canonical" href="https://stirling.com/app/compress" />',+ );+ expect(html).toContain('"logo":"https://stirling.com/app/modern-logo');+ expect(html).not.toContain("stirling-pdf.pages.dev");+ expect(buildSitemap(manifest, bases)).toContain(+ "<loc>https://stirling.com/app/compress</loc>",+ );+ });+});++describe("prerender refuses a drifted HTML shell", () => {+ const entry = {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ };++ it("throws instead of silently shipping the shell's own metadata", () => {+ expect(() =>+ injectOg("<html><head><title>x</title></head></html>", entry, {}),+ ).toThrow(/description/);+ expect(() =>+ injectOg(+ '<html><head><meta name="description" content="x" /></head></html>',+ entry,+ {},+ ),+ ).toThrow(/title/);+ });++ it("throws when the React mount point is gone", () => {+ expect(() =>+ injectBody("<body><main></main></body>", "<h1>x</h1>"),+ ).toThrow(/root/);+ });++ it("prerenders the shipped editor/index.html, not just the test fixture", async () => {+ const here = import.meta.url;+ const shell = await fs.readFile(+ fileURLToPath(new URL("../../../index.html", here)),+ "utf8",+ );+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "og-real-shell-"));+ await fs.writeFile(path.join(dir, "index.html"), shell);+ const manifest = {+ default: {+ image: "/og_images/home.png",+ title: "Stirling PDF",+ description: "home",+ },+ byTool: {+ compress: {+ image: "/og_images/compress.png",+ title: "Compress - Stirling PDF",+ description: "c",+ },+ },+ byPath: { "/compress": "compress" },+ navLinks: [{ path: "/compress", label: "Compress" }],+ };++ await prerenderOg({+ distDir: dir,+ manifest,+ ogBase: "https://stirling.com",+ canonicalBase: "https://stirling.com",+ baseHref: "/",+ injectLanding: true,+ });++ const html = await fs.readFile(path.join(dir, "compress.html"), "utf8");+ expect(html).toContain("<title>Compress - Stirling PDF</title>");+ expect(html).toContain('<meta name="description" content="c" />');+ expect(html).toContain(+ '<link rel="canonical" href="https://stirling.com/compress" />',+ );+ expect(html).toContain('<div id="root"><div class="spdf-seo">');++ await fs.rm(dir, { recursive: true, force: true });+ });+});++// Contract over the committed generator output, which the fixture-based suites+// above cannot see. Regenerate with `node scripts/generate-og-metadata.mjs`.+describe("shipped OG manifests", () => {+ // Read import.meta.url via a variable: inlined, vite rewrites the+ // `new URL(..., import.meta.url)` asset pattern and the path resolves wrong.+ const here = import.meta.url;+ const load = async (name: string) =>+ JSON.parse(+ await fs.readFile(+ fileURLToPath(new URL(`../../../public/${name}`, here)),+ "utf8",+ ),+ );++ it.each(["og-metadata.json", "og-metadata.saas.json"])(+ "%s marks every link tool noindex and keeps it out of the sitemap",+ async (name) => {+ const manifest = await load(name);+ const linkIds: readonly string[] = CORE_LINK_TOOL_IDS;+ for (const id of linkIds)+ expect(manifest.byTool[id]?.noindex, id).toBe(true);++ const linkPaths = Object.entries(manifest.byPath)+ .filter(([, id]) => linkIds.includes(id as string))+ .map(([routePath]) => routePath);+ expect(linkPaths.length).toBeGreaterThanOrEqual(linkIds.length);++ const xml = buildSitemap(manifest, {+ canonicalBase: "https://stirling.com",+ });+ for (const routePath of linkPaths)+ expect(xml).not.toContain(+ `<loc>https://stirling.com${routePath}</loc>`,+ );+ },+ );++ it.each(["og-metadata.json", "og-metadata.saas.json"])(+ "%s canonicalises every alias at a primary that is itself in the sitemap",+ async (name) => {+ const manifest = await load(name);+ const canonicalByPath: Record<string, string> =+ manifest.canonicalByPath ?? {};+ const xml = buildSitemap(manifest, {+ canonicalBase: "https://stirling.com",+ });+ for (const [alias, primary] of Object.entries(canonicalByPath)) {+ expect(alias, `${alias} canonicalises to itself`).not.toBe(primary);+ // A chain (alias -> alias -> primary) drops the target from the sitemap+ // as well, leaving the whole group unindexed.+ expect(canonicalByPath[primary], `${alias} -> ${primary}`).toBe(+ undefined,+ );+ expect(+ manifest.byPath[primary],+ `${alias} -> ${primary}`,+ ).toBeDefined();+ const entry = manifest.byTool[manifest.byPath[primary]];+ if (!entry?.noindex)+ expect(xml, `${alias} -> ${primary}`).toContain(+ `<loc>https://stirling.com${primary}</loc>`,+ );+ }+ },+ );++ it("opts the metered /processor out of the price-0 Offer, not /editor", async () => {+ const manifest = await load("og-metadata.saas.json");+ expect(manifest.byTool["/processor"].noOffer).toBe(true);+ expect(manifest.byTool["/editor"].noOffer).toBeUndefined();+ });++ it("gives the self-hosted home the brand card, verbatim", async () => {+ const manifest = await load("og-metadata.json");+ expect(manifest.default.title).toBe("Stirling PDF - 30M+ Downloads");+ expect(manifest.default.description).toBe(+ "A free, private PDF editor you can run on any infrastructure.",+ );+ const html = injectOg(TEMPLATE, manifest.default, { isHome: true });+ expect(html).toContain(+ '<meta name="twitter:title" content="Stirling PDF - 30M+ Downloads" />',+ );+ expect(html).toContain(+ '<meta name="twitter:description" content="A free, private ' ++ 'PDF editor you can run on any infrastructure." />',+ );+ });++ it.each(["og-metadata.json", "og-metadata.saas.json"])(+ "%s labels every app surface the router actually renders",+ async (name) => {+ const manifest = await load(name);+ // Routes that render a page of their own. Redirect-only paths+ // (/processor/users and friends) are deliberately absent.+ const surfaces = [+ "/editor",+ "/files",+ "/login",+ "/docs",+ "/settings",+ "/settings/api-keys",+ "/processor",+ "/processor/pipelines",+ "/processor/sources",+ "/processor/integrations",+ "/processor/documents",+ "/processor/review",+ ];+ for (const routePath of surfaces) {+ const entry = manifest.byTool[manifest.byPath[routePath]];+ expect(entry, routePath).toBeDefined();+ expect(entry.title, routePath).not.toBe(manifest.default.title);+ }+ // Redirects have nothing to label, so they get no prerendered page.+ for (const gone of ["/processor/users", "/processor/usage"])+ expect(manifest.byPath[gone], gone).toBeUndefined();+ },+ );++ it("keeps prerendered pages off the backend's own static HTML", async () => {+ // ReactRoutingController serves mobile-sign.html itself in desktop mode; a+ // prerendered route of the same name would shadow it.+ const manifest = await load("og-metadata.json");+ for (const reserved of ["/mobile-sign", "/mobile-upload", "/api-landing"])+ expect(manifest.byPath[reserved], reserved).toBeUndefined();+ });++ it.each(["og-metadata.json", "og-metadata.saas.json"])(+ "%s keeps every route within the two segments the backend can serve",+ async (manifestName) => {+ const manifest = await load(manifestName);+ for (const routePath of Object.keys(manifest.byPath))+ expect(+ routePath.replace(/^\//, "").split("/").length,+ routePath,+ ).toBeLessThanOrEqual(2);+ },+ );});diff --git a/frontend/editor/src/core/data/urlSeoOverrides.json b/frontend/editor/src/core/data/urlSeoOverrides.jsonnew file mode 100644index 0000000000..094fcc8e6c--- /dev/null+++ b/frontend/editor/src/core/data/urlSeoOverrides.json@@ -0,0 +1,430 @@+{+ "/pdf-to-word": {+ "title": "PDF to Word Converter",+ "description": "Convert PDF files into editable Microsoft Word (DOCX) documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-xlsx": {+ "title": "PDF to Excel Converter",+ "description": "Convert PDF tables into editable Microsoft Excel (XLSX) spreadsheets. Free, fast, and private."+ },+ "/pdf-to-csv": {+ "title": "PDF to CSV Converter",+ "description": "Extract tables from PDF files into CSV data. Free, fast, and private - no signup required."+ },+ "/pdf-to-img": {+ "title": "PDF to Image Converter",+ "description": "Convert PDF pages into high-quality JPG or PNG images. Free and private, right in your browser."+ },+ "/pdf-to-presentation": {+ "title": "PDF to PowerPoint Converter",+ "description": "Convert PDF files into editable PowerPoint (PPTX) presentations. Free, fast, and private."+ },+ "/pdf-to-text": {+ "title": "PDF to Text Converter",+ "description": "Extract plain text from PDF documents. Free, fast, and private - no signup or email required."+ },+ "/pdf-to-markdown": {+ "title": "PDF to Markdown Converter",+ "description": "Convert PDF documents into clean Markdown text. Free and private, right in your browser."+ },+ "/pdf-to-html": {+ "title": "PDF to HTML Converter",+ "description": "Convert PDF documents into HTML web pages. Free and private, right in your browser."+ },+ "/pdf-to-xml": {+ "title": "PDF to XML Converter",+ "description": "Convert PDF documents into structured XML. Free, fast, and private."+ },+ "/pdf-to-pdfa": {+ "title": "PDF to PDF/A Converter",+ "description": "Convert PDFs to the PDF/A archival standard for long-term preservation. Free and private."+ },+ "/img-to-pdf": {+ "title": "Image to PDF Converter",+ "description": "Convert JPG, PNG, and other images into a single PDF document. Free, fast, and private."+ },+ "/html-to-pdf": {+ "title": "HTML to PDF Converter",+ "description": "Convert HTML files and web pages into PDF documents. Free, fast, and private."+ },+ "/markdown-to-pdf": {+ "title": "Markdown to PDF Converter",+ "description": "Convert Markdown files into polished PDF documents. Free and private, right in your browser."+ },+ "/eml-to-pdf": {+ "title": "Email (EML) to PDF Converter",+ "description": "Convert email (EML) files into PDF documents. Free, fast, and private - no signup required."+ },+ "/file-to-pdf": {+ "title": "File to PDF Converter",+ "description": "Convert Word, Excel, PowerPoint, and more into PDF documents. Free, fast, and private."+ },+ "/cbr-to-pdf": {+ "title": "CBR to PDF Converter",+ "description": "Convert CBR comic book archives into PDF documents. Free and private, right in your browser."+ },+ "/pdf-to-cbr": {+ "title": "PDF to CBR Converter",+ "description": "Convert PDF documents into CBR comic book archives. Free and private."+ },+ "/cbz-to-pdf": {+ "title": "CBZ to PDF Converter",+ "description": "Convert CBZ comic book archives into PDF documents. Free and private."+ },+ "/pdf-to-cbz": {+ "title": "PDF to CBZ Converter",+ "description": "Convert PDF documents into CBZ comic book archives. Free and private."+ },+ "/compress": {+ "title": "Compress PDF",+ "description": "Compress PDFs to reduce their file size."+ },+ "/compress-pdf": {+ "title": "Compress PDF",+ "description": "Compress PDFs to reduce their file size."+ },+ "/merge": {+ "title": "Merge PDF",+ "description": "Merge multiple PDFs into a single document"+ },+ "/merge-pdfs": {+ "title": "Merge PDF",+ "description": "Merge multiple PDFs into a single document"+ },+ "/split": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/split-pdfs": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/auto-split-pdf": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/auto-size-split-pdf": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/split-by-size-or-count": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/split-pdf-by-sections": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/split-pdf-by-chapters": {+ "title": "Split PDF",+ "description": "Split PDFs into multiple documents"+ },+ "/rotate": {+ "title": "Rotate PDF",+ "description": "Easily rotate your PDFs."+ },+ "/rotate-pdf": {+ "title": "Rotate PDF",+ "description": "Easily rotate your PDFs."+ },+ "/convert": {+ "title": "PDF Converter",+ "description": "Convert files to and from PDF format"+ },+ "/convert-pdf": {+ "title": "PDF Converter",+ "description": "Convert files to and from PDF format"+ },+ "/ocr": {+ "title": "OCR PDF",+ "description": "Extract text from scanned PDFs using Optical Character Recognition"+ },+ "/ocr-pdf": {+ "title": "OCR PDF",+ "description": "Extract text from scanned PDFs using Optical Character Recognition"+ },+ "/watermark": {+ "title": "Add Watermark to PDF",+ "description": "Add a custom watermark to your PDF document."+ },+ "/add-watermark": {+ "title": "Add Watermark to PDF",+ "description": "Add a custom watermark to your PDF document."+ },+ "/sign": {+ "title": "Sign PDF",+ "description": "Adds signature to PDF by drawing, text or image"+ },+ "/cert-sign": {+ "title": "Sign PDF with a Certificate",+ "description": "Sign PDF documents using digital certificates"+ },+ "/manage-signatures": {+ "title": "Sign PDF with a Certificate",+ "description": "Sign PDF documents using digital certificates"+ },+ "/redact": {+ "title": "Redact PDF",+ "description": "Permanently remove sensitive information from PDF documents"+ },+ "/auto-redact": {+ "title": "Redact PDF",+ "description": "Permanently remove sensitive information from PDF documents"+ },+ "/crop": {+ "title": "Crop PDF",+ "description": "Crop a PDF to reduce its size (maintains text!)"+ },+ "/flatten": {+ "title": "Flatten PDF",+ "description": "Remove all interactive elements and forms from a PDF"+ },+ "/repair": {+ "title": "Repair PDF",+ "description": "Repair corrupted or damaged PDF files"+ },+ "/compare": {+ "title": "Compare PDF Files",+ "description": "Compare two PDF documents and highlight differences"+ },+ "/sanitize": {+ "title": "Sanitize PDF",+ "description": "Remove potentially harmful elements from PDF files"+ },+ "/sanitize-pdf": {+ "title": "Sanitize PDF",+ "description": "Remove potentially harmful elements from PDF files"+ },+ "/add-password": {+ "title": "Password Protect PDF",+ "description": "Add password protection and restrictions to PDF files"+ },+ "/remove-password": {+ "title": "Remove PDF Password",+ "description": "Remove password protection from PDF documents"+ },+ "/change-permissions": {+ "title": "Change PDF Permissions",+ "description": "Change document restrictions and permissions"+ },+ "/add-page-numbers": {+ "title": "Add Page Numbers to PDF",+ "description": "Add Page numbers throughout a document in a set location"+ },+ "/add-text": {+ "title": "Add Text to PDF",+ "description": "Add custom text anywhere in your PDF"+ },+ "/add-image": {+ "title": "Add Image to PDF",+ "description": "Add images anywhere in your PDF"+ },+ "/add-stamp": {+ "title": "Add Stamp to PDF",+ "description": "Add text or add image stamps at set locations"+ },+ "/stamp": {+ "title": "Add Stamp to PDF",+ "description": "Add text or add image stamps at set locations"+ },+ "/add-attachments": {+ "title": "Add Attachments to PDF",+ "description": "Add or remove embedded files (attachments) to/from a PDF"+ },+ "/extract-pages": {+ "title": "Extract PDF Pages",+ "description": "Extract specific pages from a PDF document"+ },+ "/extract-page": {+ "title": "Extract PDF Pages",+ "description": "Extract specific pages from a PDF document"+ },+ "/remove-pages": {+ "title": "Delete Pages from PDF",+ "description": "Remove specific pages from a PDF document"+ },+ "/remove-blanks": {+ "title": "Remove Blank Pages from PDF",+ "description": "Remove blank pages from PDF documents"+ },+ "/remove-image": {+ "title": "Remove Images from PDF",+ "description": "Remove all images from a PDF document"+ },+ "/remove-image-pdf": {+ "title": "Remove Images from PDF",+ "description": "Remove all images from a PDF document"+ },+ "/remove-annotations": {+ "title": "Remove Annotations from PDF",+ "description": "Remove annotations and comments from PDF documents"+ },+ "/reorganize-pages": {+ "title": "Organize PDF Pages",+ "description": "Rearrange, duplicate, or delete PDF pages with visual drag-and-drop control."+ },+ "/pdf-organizer": {+ "title": "Organize PDF Pages",+ "description": "Rearrange, duplicate, or delete PDF pages with visual drag-and-drop control."+ },+ "/extract-images": {+ "title": "Extract Images from PDF",+ "description": "Extract images from PDF documents"+ },+ "/page-layout": {+ "title": "PDF Multi-Page Layout",+ "description": "Merge multiple pages of a PDF document into a single page"+ },+ "/multi-page-layout": {+ "title": "PDF Multi-Page Layout",+ "description": "Merge multiple pages of a PDF document into a single page"+ },+ "/scale-pages": {+ "title": "Resize PDF Pages",+ "description": "Change the size/scale of a page and/or its contents."+ },+ "/pdf-to-single-page": {+ "title": "Combine PDF into a Single Page",+ "description": "Merges all PDF pages into one large single page"+ },+ "/single-large-page": {+ "title": "Combine PDF into a Single Page",+ "description": "Merges all PDF pages into one large single page"+ },+ "/adjust-contrast": {+ "title": "Adjust PDF Colors and Contrast",+ "description": "Adjust colors and contrast of PDF documents"+ },+ "/replace-color": {+ "title": "Replace and Invert PDF Colors",+ "description": "Replace or invert colors in PDF documents"+ },+ "/replace-color-pdf": {+ "title": "Replace and Invert PDF Colors",+ "description": "Replace or invert colors in PDF documents"+ },+ "/replace-and-invert-color-pdf": {+ "title": "Replace and Invert PDF Colors",+ "description": "Replace or invert colors in PDF documents"+ },+ "/change-metadata": {+ "title": "Edit PDF Metadata",+ "description": "Change/Remove/Add metadata from a PDF document"+ },+ "/get-pdf-info": {+ "title": "PDF Info and Metadata Viewer",+ "description": "Grabs any and all information possible on PDFs"+ },+ "/get-info-on-pdf": {+ "title": "PDF Info and Metadata Viewer",+ "description": "Grabs any and all information possible on PDFs"+ },+ "/overlay-pdfs": {+ "title": "Overlay PDFs",+ "description": "A free, private PDF editor you can run on any infrastructure."+ },+ "/overlay-pdf": {+ "title": "Overlay PDFs",+ "description": "A free, private PDF editor you can run on any infrastructure."+ },+ "/edit-table-of-contents": {+ "title": "Edit PDF Bookmarks",+ "description": "Add or edit bookmarks and table of contents in PDF documents"+ },+ "/pdf-text-editor": {+ "title": "Edit PDF Text",+ "description": "Review and edit text and images in PDFs with grouped text editing and PDF regeneration"+ },+ "/form-fill": {+ "title": "Fill PDF Forms",+ "description": "Fill, create, edit, and delete PDF form fields with a visual editor"+ },+ "/multi-tool": {+ "title": "PDF Page Editor",+ "description": "Use multiple tools on a single PDF document"+ },+ "/read": {+ "title": "PDF Viewer",+ "description": "View and annotate PDFs. Highlight text, draw, or insert comments for review and collaboration."+ },+ "/view-pdf": {+ "title": "PDF Viewer",+ "description": "View and annotate PDFs. Highlight text, draw, or insert comments for review and collaboration."+ },+ "/annotate": {+ "title": "Annotate PDF",+ "description": "Highlight, draw, add notes, and shapes directly in the viewer"+ },+ "/annotations": {+ "title": "Annotate PDF",+ "description": "Highlight, draw, add notes, and shapes directly in the viewer"+ },+ "/automate": {+ "title": "PDF Workflow Automation",+ "description": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."+ },+ "/pipeline": {+ "title": "PDF Workflow Automation",+ "description": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks."+ },+ "/scanner-effect": {+ "title": "Make a PDF Look Scanned",+ "description": "Create a PDF that looks like it was scanned"+ },+ "/fake-scan": {+ "title": "Make a PDF Look Scanned",+ "description": "Create a PDF that looks like it was scanned"+ },+ "/scanner-image-split": {+ "title": "Split Scanned Photos",+ "description": "Detect and split scanned photos into separate pages"+ },+ "/extract-image-scans": {+ "title": "Split Scanned Photos",+ "description": "Detect and split scanned photos into separate pages"+ },+ "/auto-rename": {+ "title": "Auto Rename PDF Files",+ "description": "Automatically rename PDF files based on their content"+ },+ "/booklet-imposition": {+ "title": "Create a PDF Booklet",+ "description": "Create booklets with proper page ordering and multi-page layout for printing and binding"+ },+ "/unlock-p-d-f-forms": {+ "title": "Unlock PDF Forms",+ "description": "Remove read-only property of form fields in a PDF document."+ },+ "/unlock-pdf-forms": {+ "title": "Unlock PDF Forms",+ "description": "Remove read-only property of form fields in a PDF document."+ },+ "/remove-cert-sign": {+ "title": "Remove PDF Certificate Signature",+ "description": "Remove digital signature from PDF documents"+ },+ "/remove-certificate-sign": {+ "title": "Remove PDF Certificate Signature",+ "description": "Remove digital signature from PDF documents"+ },+ "/validate-signature": {+ "title": "Validate PDF Signature",+ "description": "Verify digital signatures and certificates in PDF documents"+ },+ "/timestamp-pdf": {+ "title": "Timestamp PDF",+ "description": "Add an RFC 3161 document timestamp to prove when your PDF existed"+ },+ "/show-j-s": {+ "title": "Show JavaScript in PDF",+ "description": "Extract and display JavaScript code from PDF documents"+ },+ "/show-js": {+ "title": "Show JavaScript in PDF",+ "description": "Extract and display JavaScript code from PDF documents"+ },+ "/show-javascript": {+ "title": "Show JavaScript in PDF",+ "description": "Extract and display JavaScript code from PDF documents"+ }+}diff --git a/frontend/editor/src/core/pages/HomePage.tsx b/frontend/editor/src/core/pages/HomePage.tsxindex 9d4198a8ba..ec4f2aaa41 100644--- a/frontend/editor/src/core/pages/HomePage.tsx+++ b/frontend/editor/src/core/pages/HomePage.tsx@@ -12,6 +12,7 @@ import { Group } from "@mantine/core";import { useSidebarContext } from "@app/contexts/SidebarContext";import { useDocumentMeta } from "@app/hooks/useDocumentMeta";import { getToolOgImage } from "@app/data/ogImage";+import urlSeoOverrides from "@app/data/urlSeoOverrides.json";import { useBaseUrl } from "@app/hooks/useBaseUrl";import { useIsMobile, useIsTouch } from "@app/hooks/useIsMobile";import { useAppConfig } from "@app/contexts/AppConfigContext";@@ -104,7 +105,7 @@ function writePersistedSidebarCollapsed(collapsed: boolean): void {type MobileView = "tools" | "workbench";export default function HomePage() {- const { t } = useTranslation();+ const { t, i18n } = useTranslation();const policiesEnabled = usePoliciesEnabled();const { sidebarRefs } = useSidebarContext();@@ -465,25 +466,45 @@ export default function HomePage() {const baseUrl = useBaseUrl();- // Update document meta when tool changes+ // Update document meta when tool changes. Convert aliases (e.g. /pdf-to-word)+ // all share the one `convert` tool, so prefer a per-URL SEO override when the+ // path has one - this keeps the hydrated title/description matching the+ // keyword-targeted copy that crawlers see in the prerendered HTML.const appName = config?.appNameNavbar || "Stirling PDF";+ // The override copy is English-only (it mirrors the prerendered HTML), so+ // every other locale keeps its translated tool name and description.+ const isEnglish = (i18n.resolvedLanguage || i18n.language || "").startsWith(+ "en",+ );+ const seoOverride = isEnglish+ ? (+ urlSeoOverrides as Record<+ string,+ { title: string; description: string }+ >+ )[location.pathname]+ : undefined;+ const defaultDescription = t(+ "app.description",+ "A free, private PDF editor you can run on any infrastructure.",+ );+ const metaTitle = seoOverride+ ? `${seoOverride.title} - ${appName}`+ : selectedTool+ ? `${selectedTool.name} - ${appName}`+ : appName;+ const metaDescription =+ seoOverride?.description || selectedTool?.description || defaultDescription;useDocumentMeta({- title: selectedTool ? `${selectedTool.name} - ${appName}` : appName,- description:- selectedTool?.description ||- t(- "app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",- ),- ogTitle: selectedTool ? `${selectedTool.name} - ${appName}` : appName,- ogDescription:- selectedTool?.description ||- t(- "app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",- ),+ title: metaTitle,+ description: metaDescription,+ ogTitle: metaTitle,+ ogDescription: metaDescription,ogImage: getToolOgImage(baseUrl, selectedToolKey),- ogUrl: selectedTool ? `${baseUrl}${window.location.pathname}` : baseUrl,+ ogUrl:+ seoOverride || selectedTool+ ? `${baseUrl}${window.location.pathname}`+ : baseUrl,});// Note: File selection limits are now handled directly by individual toolsdiff --git a/frontend/editor/src/proprietary/routes/InviteAccept.tsx b/frontend/editor/src/proprietary/routes/InviteAccept.tsxindex 46431c3039..84b96e0665 100644--- a/frontend/editor/src/proprietary/routes/InviteAccept.tsx+++ b/frontend/editor/src/proprietary/routes/InviteAccept.tsx@@ -48,12 +48,12 @@ export default function InviteAccept() {title: `${t("invite.welcome", "Welcome to Stirling PDF")} - Stirling PDF`,description: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogTitle: `${t("invite.welcome", "Welcome to Stirling PDF")} - Stirling PDF`,ogDescription: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogImage: `${baseUrl}/og_images/home.png`,ogUrl: `${window.location.origin}${window.location.pathname}`,diff --git a/frontend/editor/src/proprietary/routes/Login.tsx b/frontend/editor/src/proprietary/routes/Login.tsxindex 853a75a39b..3ce9d20449 100644--- a/frontend/editor/src/proprietary/routes/Login.tsx+++ b/frontend/editor/src/proprietary/routes/Login.tsx@@ -395,12 +395,12 @@ export default function Login() {title: `${t("login.title", "Sign in")} - Stirling PDF`,description: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogTitle: `${t("login.title", "Sign in")} - Stirling PDF`,ogDescription: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogImage: `${baseUrl}/og_images/home.png`,ogUrl: `${window.location.origin}${window.location.pathname}`,diff --git a/frontend/editor/src/saas/routes/Login.tsx b/frontend/editor/src/saas/routes/Login.tsxindex b77495985c..d47e7ebce4 100644--- a/frontend/editor/src/saas/routes/Login.tsx+++ b/frontend/editor/src/saas/routes/Login.tsx@@ -84,12 +84,12 @@ export default function Login() {title: `${t("login.title", "Sign in")} - Stirling PDF`,description: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogTitle: `${t("login.title", "Sign in")} - Stirling PDF`,ogDescription: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogImage: `${baseUrl}/og_images/saas/app.png`,ogUrl: `${window.location.origin}${window.location.pathname}`,diff --git a/frontend/editor/src/saas/routes/Signup.tsx b/frontend/editor/src/saas/routes/Signup.tsxindex 8af0dded30..c1d401645d 100644--- a/frontend/editor/src/saas/routes/Signup.tsx+++ b/frontend/editor/src/saas/routes/Signup.tsx@@ -112,12 +112,12 @@ export default function Signup() {title: `${t("signup.title", "Create an account")} - Stirling PDF`,description: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogTitle: `${t("signup.title", "Create an account")} - Stirling PDF`,ogDescription: t("app.description",- "The Free Adobe Acrobat alternative (10M+ Downloads)",+ "A free, private PDF editor you can run on any infrastructure.",),ogImage: `${baseUrl}/og_images/saas/app.png`,ogUrl: `${window.location.origin}${window.location.pathname}`,diff --git a/frontend/editor/vite.config.ts b/frontend/editor/vite.config.tsindex cb9772e424..26c264b4dd 100644--- a/frontend/editor/vite.config.ts+++ b/frontend/editor/vite.config.ts@@ -85,11 +85,12 @@ function compressStaticCopyPlugin(): PluginOption {// server-side rendering. Cloudflare Pages serves `compress.html` at `/compress`// automatically (clean URLs), and the Spring backend serves the same file.//-// Absolute URLs (best for Facebook/X) are used when a canonical base is known:+// Absolute URLs (best for Facebook/X) are used when the deploy origin is known:// VITE_OG_BASE_URL (custom domain) or CF_PAGES_URL (set automatically by Cloudflare// Pages). Otherwise URLs stay root-relative, which still resolves against whatever-// origin serves the page (correct for self-hosted Docker). Logic lives in-// scripts/og-prerender.mjs so it can be unit-tested without a full build.+// origin serves the page (correct for self-hosted Docker). Indexing signals+// (canonical, JSON-LD, sitemap) need VITE_OG_BASE_URL specifically - see below.+// Logic lives in scripts/og-prerender.mjs so it can be unit-tested without a full build.function prerenderOgPlugin(isSaas: boolean): PluginOption {// SaaS (stirling.com) prerenders the marketing cards from a dedicated// manifest; every other flavour uses the tool-registry manifest.@@ -100,16 +101,27 @@ function prerenderOgPlugin(isSaas: boolean): PluginOption {name: "prerender-og",apply: "build" as const,async closeBundle() {- // oxlint-disable-next-line no-restricted-imports -- vite config runs before path aliases resolve, so a relative import is required here- const { prerenderOg } = await import("./scripts/og-prerender.mjs");- const ogBase = (- process.env.VITE_OG_BASE_URL ||- process.env.CF_PAGES_URL ||- ""- ).replace(/\/+$/, "");+ const { prerenderOg, buildSitemap, resolveDeployBases } =+ // oxlint-disable-next-line no-restricted-imports -- vite config runs before path aliases resolve, so a relative import is required here+ await import("./scripts/og-prerender.mjs");+ const canonicalOrigin = process.env.VITE_OG_BASE_URL || "";+ const deployOrigin = process.env.CF_PAGES_URL || "";// Absolute deploy base for nested routes' <base href> (matches vite `base`).const subpath = (process.env.RUN_SUBPATH || "").replace(/^\/+|\/+$/g, "");const baseHref = subpath ? `/${subpath}/` : "/";+ const { ogBase, canonicalBase } = resolveDeployBases({+ canonicalOrigin,+ deployOrigin,+ baseHref,+ });+ if (!canonicalBase && ogBase) {+ console.warn(+ "[prerender-og] VITE_OG_BASE_URL is unset: falling back to CF_PAGES_URL " ++ `(${ogBase}) for social-card URLs only. No canonical links, JSON-LD ` ++ "or sitemap will be emitted - set VITE_OG_BASE_URL to the public " ++ "origin to enable them.",+ );+ }let manifest;try {manifest = JSON.parse(@@ -123,13 +135,44 @@ function prerenderOgPlugin(isSaas: boolean): PluginOption {return;}const distDir = path.resolve(__dirname, "dist");- const count = await prerenderOg({ distDir, manifest, ogBase, baseHref });+ // The crawlable landing body only pays for itself where a crawler can+ // reach the page; self-hosted and desktop builds just get the flash.+ const injectLanding = Boolean(ogBase);+ const count = await prerenderOg({+ distDir,+ manifest,+ ogBase,+ canonicalBase,+ baseHref,+ injectLanding,+ });console.log(`[prerender-og] wrote ${count} prerendered route pages` +(ogBase- ? ` (absolute URLs, base=${ogBase})`- : " (root-relative URLs)"),+ ? ` (absolute URLs, base=${ogBase}, crawlable landing body)`+ : " (root-relative URLs, no landing body)"),);++ // Sitemaps are an indexing instruction, so they need the canonical origin,+ // not just any absolute one. Self-hosted and preview builds skip it.+ const sitemap = buildSitemap(manifest, { canonicalBase });+ if (sitemap) {+ await fs.writeFile(path.join(distDir, "sitemap.xml"), sitemap);+ // Point robots.txt at the sitemap (best-effort; robots.txt may be absent).+ const robotsPath = path.join(distDir, "robots.txt");+ try {+ let robots = await fs.readFile(robotsPath, "utf8");+ if (!/^\s*Sitemap:/im.test(robots)) {+ robots =+ robots.replace(/\s*$/, "\n") ++ `Sitemap: ${canonicalBase}/sitemap.xml\n`;+ await fs.writeFile(robotsPath, robots);+ }+ } catch {+ // no robots.txt in dist - nothing to link+ }+ console.log(`[prerender-og] wrote sitemap.xml (base=${canonicalBase})`);+ }},};}