The master branch is what's published at https://deltaxml.github.io by GitHub Pages. Changes for the next
release of the XSLT/XPath extension are made on a release branch (e.g. release2.1) and merged to master
when the extension is released.
Each page of the user guide, vscode-xslt-xpath/<page>.html, is generated from vscode-xslt-xpath/authoring/<page>.xml,
which holds just the page's content. The page shell - the head, top bar and nav that lists the pages - is
authoring/layout.xml.
To generate the HTML from VS Code, with the XSLT extension installed, run the build task createVSCodePages
(the default build task). This runs createPages.xsl, which writes:
- a page for each entry in the nav in
layout.xml, with its title, a description for search results, its canonical URL and Open Graph tags in the head, and the 'On this page' contents - JSON-LD structured data in each page's head:
SoftwareApplicationon the home page andTechArticleon the rest /llms.txtat the site's root: the guide's pages, with their titles and descriptions, for AI assistantsall-pages.html, the whole guide as one page, for printing and for the PDFresources/search-index.js, for the guide's search box
A page's description is its first paragraph, cut to 160 characters. If the first paragraph doesn't describe the
page - it's a cross-reference, say - give the page its own description in a <head> in its authoring file:
<html lang="en">
<head>
<meta name="description" content="..."/>
</head>
<div class="main">The same <head> can also hold a <title>, which is the page's title in search results and link previews - use the
words people search for, e.g. XSLT Testing with XSpec in VS Code, rather than the nav's label - and an <h1>, if the
page's heading should differ from its nav label (only the home page does). Without a <title>, the page is titled
<nav label> | VS Code XSLT/XPath.
The other tasks in .vscode/tasks.json:
createVSCodePDF- the guide as a PDF, fromall-pages.html. Needs WeasyPrint (brew install weasyprint).createSitemap-/sitemap.xml, for Google Search Console. See the release checklist below.
- Add
authoring/<page>.xmlwith the content in a<div class="main">. - Add it to the nav in
authoring/layout.xml. Pages that aren't in the nav aren't generated, searched, or listed in the sitemap. - Run
createVSCodePages.
- On the release branch, run
createVSCodePagesandcreateVSCodePDF, and commit the generated pages and PDF. - Merge the release branch to
masterand push. GitHub Pages deploys within a few minutes. - On
master, run thecreateSitemaptask and commit and pushsitemap.xml. It lists the pages in the nav, each with the date of the last commit that touched it, which is why it's generated after the merge: Google uses those dates to decide what to recrawl. Don't push a sitemap that lists pagesmasterdoesn't have yet - Google would fetch URLs that 404. - In Google Search Console, the sitemap at https://deltaxml.github.io/sitemap.xml is already submitted, so Google picks the new one up on its own: there's no need to resubmit it. Its status may show 'Couldn't fetch' for a day or two after a change - that's Google's processing queue, not a problem with the site.
- Ask Google to crawl the pages you want in search results soon - new pages, and ones with substantial
changes. Google finds the rest from the nav links and the sitemap on its own schedule, which can take
weeks. For each page:
- Paste the page's URL, e.g.
https://deltaxml.github.io/vscode-xslt-xpath/schematron.html, into the search box at the top of Search Console (URL Inspection). - Click 'Test live URL' and wait for the test to finish. The 'Live test' tab should say the page is available. ('URL is not on Google' on the 'Google Index' tab just means it isn't indexed yet.)
- Click 'Request indexing'. 'Added to a priority crawl queue' means it worked. Requesting the same URL again doesn't move it up the queue, and there's a quota of roughly a dozen requests a day, so choose the pages that matter.
- Paste the page's URL, e.g.
- A few days later, check with a Google search for
site:deltaxml.github.io/vscode-xslt-xpath, or inspect a URL again and look at the 'Google Index' tab.
robots.txt at the root allows all crawlers, including the AI ones, and points at the sitemap.
The HTML is generated with XSLT so that the page shell maintained in layout.xml - the head, top bar and
nav - is copied into every page, and the pages' descriptions, contents, search index and the all-pages version
come from the same source as the content.