Skip to content

docs(sdks): Generate DOCX / PPTX example pages for JavaScript, TypeScript, Python, PHP and Ruby - #264

Draft
nicolasiscoding wants to merge 3 commits into
developfrom
seo/sdk-docgen-examples
Draft

nicolasiscoding wants to merge 3 commits into
developfrom
seo/sdk-docgen-examples

Conversation

@nicolasiscoding

@nicolasiscoding nicolasiscoding commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Developer searches such as "typescript docx integration", "javascript pptx sdk", "ruby pptx sdk" and "sdk for dynamic document generation" already show these docs on Google's first pages, but no page is built for them. This PR adds one example page per language that answers the query directly with a script you can copy and run.

New pages (sidebar: SDKs > Generate DOCX / PPTX examples, collapsed):

Page Title Query it targets
/docs/SDKs/generate-docx-pptx-javascript JavaScript PPTX SDK: Generate PPTX and DOCX javascript pptx sdk
/docs/SDKs/generate-docx-pptx-typescript TypeScript DOCX Integration Example typescript docx integration
/docs/SDKs/generate-docx-pptx-python Python DOCX Generation Example: Word and PPTX python docx generation
/docs/SDKs/generate-docx-pptx-php PHP DOCX SDK Example: Word and PowerPoint php docx sdk
/docs/SDKs/generate-docx-pptx-ruby Ruby DOCX Example: Word and PowerPoint ruby docx example, ruby pptx sdk

Each page uses the same flow: what you need (template, template ID from Developer Mode, credentials), install, environment variables, a data.json, the full script, how to run it, what comes back, the four mimeTypes, and next steps (Deliverable SDK reference on the right language tab, TurboSign hand-off by deliverable ID, REST API, the language setup page, and the matching www.turbodocx.com guide where there is one). The SDK overview (docs/SDKs/index.md) gets a short "Generate DOCX / PPTX examples" list under the Deliverable SDKs table.

Query data comes from the Google Search Console mirror in our analytics warehouse (the direct Search Console API is unavailable today).

Ticket checklist

#255 (DOC-3) SDK example pages for doc-generation queries

  • JavaScript "Generate a DOCX/PPTX" page with copy-paste code
  • TypeScript page
  • Ruby page. The turbodocx-sdk gem is published on RubyGems (0.9.0), so the page uses the gem rather than raw REST.
  • PHP page
  • Python page
  • Linked from the SDK index (overview list plus a sidebar category)
  • Link to the matching www.turbodocx.com guide: JavaScript, TypeScript, Python and Ruby. PHP has no matching www guide, so its page has no www link.
  • Acceptance measurement (rankings and clicks for the target queries) needs time after release; not done here.

Part of #255
Closes #263

Verification I ran

  • Pulled the published 0.9.0 packages from npm, PyPI, Packagist and RubyGems and checked every method, argument and response path the scripts use against the package source (generateDeliverable / generate_deliverable, downloadSourceFile / download_source_file, downloadPDF / download_pdf, DeliverableConfig::fromEnvironment(), result.results.deliverable.id).
  • Ran all five scripts end to end against a local mock of the three Deliverable endpoints, using the installed published packages: Node 24 (JS), tsc strict build then Node (TS), Python 3 venv, PHP 8.1 with Composer autoload, Ruby 3.0. Each one sent the expected POST /v1/deliverable body (placeholders, text, mimeType), then wrote proposal.docx and proposal.pdf from the two GET responses.
  • Checked the one-line npx tsc ... --strict --types node command on the TypeScript page compiles the example.
  • Checked a named ESM import (import { Deliverable } from "@turbodocx/sdk") works, since the JS page mentions it.
  • The page code blocks are generated from the exact files that were run, so they match byte for byte.
  • Compiled each new page and index.md with @mdx-js/mdx (no stray {...} in prose; placeholders are in code spans). Frontmatter parsed with a YAML parser. sidebars.js loads in Node.
  • No em-dashes in the new pages.
  • Titles are under 60 characters including the | TurboDocx suffix (47 to 57). Meta descriptions are 143 to 154 characters. Each title starts with its target query. I did not force number-led titles, since these are developer reference pages.
  • Plan note on each page ("every plan can generate and download the PDF; the editable DOCX/PPTX download and PowerPoint templates need a paid plan") checked against how the product gates file download and PowerPoint templates by plan. I left out generation counts, since I couldn't confirm the reset period.
  • Cloudflare Pages preview build passed for both commits (latest run 40125289328, preview https://c2c94141.turbodocx-docs.pages.dev; the first run's checks below were on https://b9a84f97.turbodocx-docs.pages.dev). On the latest preview, all five rendered <title>s match the table above. With curl on the preview:
    • All five pages return 200, with the expected <title> and the {ClientName} placeholders rendered as text.
    • Each .md twin returns 200 text/markdown with no em-dashes, and llms.txt lists all five.
    • /docs/SDKs links to all five pages.
    • Every internal link on the Ruby page returns 200, and the #variable-types, #3-turbodocx-deliverable-id and #1-get-your-credentials anchors exist on their target pages.

Not verified

  • No script has run against the live API with a real template; only against a local mock.
  • The four www.turbodocx.com guide URLs are not live yet (the Ruby one returned 404 today). They ship with an upcoming www.turbodocx.com release. Merge this after they publish, or the links 404 (Docs builds use onBrokenLinks: 'ignore', and external links aren't checked anyway).

Overlap with open PRs

Owner questions

  1. The old /docs/SDKs/deliverable-javascript and /docs/SDKs/deliverable-ruby URLs still get impressions for "javascript pptx sdk" and "ruby pptx sdk". They currently 301 to the tabbed Deliverable page. Should they point at the new example pages instead? I left them alone.
  2. Should the language install pages (javascript.md, python.md, etc.) also link to their example page? I skipped this to avoid conflicts with Improve SDK documentation titles and discoverability #48, which edits those files.
  3. Is the sidebar placement right (a collapsed "Generate DOCX / PPTX examples" category under SDKs, after "Install & configure")?

Independent review (follow-up commit 0f424aa)

Checked against primary sources:

  • Plan note checked in backend origin/master. New free orgs get hasFileDownload: false and hasPptx: false. GET /deliverable/file/:id is gated by hasFileDownload, and GET /deliverable/file/pdf/:id has no feature gate. variableStack is on for free orgs, so no plan caveat is needed for it.
  • Published 0.9.0 packages: npm engines node >=18; PyPI requires_python >=3.9; Packagist php ^8.1 plus ext-json and ext-fileinfo; the gem needs ruby >= 2.7.0, has no runtime dependencies and uses net/http. PHP DeliverableConfig::fromEnvironment() reads getenv('TURBODOCX_API_KEY') and getenv('TURBODOCX_ORG_ID'). The gem's generate_deliverable posts the request hash to /v1/deliverable as is.
  • The Developer Mode "Code" panel, the variableStack "table rows" wording and the image URL/base64 wording all match docs/SDKs/developer-mode.md and docs/SDKs/deliverable.md on develop.
  • The www guide slugs match DotCom#427 (app/guides/generate-docx-from-json-with-{javascript,typescript,python,ruby}).

Fixes:

  • TypeScript page: removed the "TypeScript 4.7 or later" floor. No package states it, and when I paired TS 4.7.4 with current @types/node the documented command failed (the SDK types themselves compile on 4.7 with --skipLibCheck). The page now says the install step adds TypeScript and the Node.js types.
  • TypeScript page: the reference link said it opens "on the TypeScript tab", but ?language=js opens the tab labelled "JavaScript / TypeScript". The wording now says that.

Re-verified on preview https://90fad900.turbodocx-docs.pages.dev (run 40126104001, green, head 0f424aa): all five pages return 200. Each has one H1, a self-canonical to docs.turbodocx.com, no robots noindex and a single " | TurboDocx" suffix. All five are in sitemap.xml, every /docs/... link on the five pages returns 200, and there are no em-dashes.

Cannibalization: in the Search Console mirror (PostHog, 90 days to 2026-10-21) the target queries get very few impressions (about 10 to 21 each), spread across /docs/SDKs and the old deliverable-javascript / deliverable-ruby URLs. I see no meaningful overlap risk. Owner question 1 on those old redirects still stands.

…peScript, Python, PHP and Ruby

One copy-paste example per language that fills a Word or PowerPoint
template from a JSON file and saves the editable file and a PDF.
Linked from the SDK overview and a new sidebar category.

This branch was successfully deployed

1 active deployment
preview — 0f424aaf Deployed Oct 24, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

seo Search engine optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(sdks): add Generate DOCX / PPTX example pages per SDK language

1 participant