<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kelin Textile</title>
    <description>The latest articles on DEV Community by Kelin Textile (@kelintextile).</description>
    <link>https://dev.to/kelintextile</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4266054%2F0aa2a2fb-4b7c-49c1-a1bd-6effb92b0d6c.png</url>
      <title>DEV Community: Kelin Textile</title>
      <link>https://dev.to/kelintextile</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kelintextile"/>
    <language>en</language>
    <item>
      <title>Publishing a factory product catalogue as data: CSV, JSON, schema.org Dataset and llms.txt</title>
      <dc:creator>Kelin Textile</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:49:57 +0000</pubDate>
      <link>https://dev.to/kelintextile/publishing-a-factory-product-catalogue-as-data-csv-json-schemaorg-dataset-and-llmstxt-286c</link>
      <guid>https://dev.to/kelintextile/publishing-a-factory-product-catalogue-as-data-csv-json-schemaorg-dataset-and-llmstxt-286c</guid>
      <description>&lt;p&gt;We are the web team at Kelin Textile, a hotel linen manufacturer in Nantong, China. Our product information starts life as a printed product catalogue: tables of models with fabric, thread count, style and the hotel grade each model is meant for. People read those tables on our website. Search engines, AI assistants and the occasional analyst read them too, and for them we wanted the same facts as structured data, not only as an HTML table.&lt;/p&gt;

&lt;p&gt;This post describes how we publish the same catalogue as web pages and as files, and the decisions we would reuse on any catalogue site.&lt;/p&gt;

&lt;h2&gt;
  
  
  One source, several outputs
&lt;/h2&gt;

&lt;p&gt;The site is a static Astro build. Every series and every model row lives in one file, &lt;code&gt;src/data/catalog.json&lt;/code&gt;. Page templates render it into series pages, and the same data, through one function, becomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kelintextile.design/data/kelin-hotel-linen-catalog.json" rel="noopener noreferrer"&gt;the catalogue JSON&lt;/a&gt; and a CSV next to it,&lt;/li&gt;
&lt;li&gt;the schema.org markup on each series page (a &lt;code&gt;ProductGroup&lt;/code&gt; with one &lt;code&gt;Product&lt;/code&gt; per model row, the table values as &lt;code&gt;additionalProperty&lt;/code&gt;),&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;llms.txt&lt;/code&gt; and &lt;code&gt;llms-full.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The data files are Astro endpoints, so they are written in the same build as the pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;APIRoute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;buildDataset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'application/json; charset=utf-8'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no separate export step that can fall behind the pages. At the time of writing the dataset holds 37 series and 318 model rows in 10 categories; the CSV has 1,932 data rows.&lt;/p&gt;

&lt;p&gt;Before any of this, one more check runs on the source: the series that come from the printed catalogue are compared with a cell-by-cell extraction of the catalogue PDF, so a value in &lt;code&gt;catalog.json&lt;/code&gt; that differs from the printed table fails the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  The JSON: nested, with provenance
&lt;/h2&gt;

&lt;p&gt;The JSON follows the catalogue's own shape: categories, then series, then models. Every series carries its page URL and the catalogue page it comes from. Trimmed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Kelin Textile hotel linen catalogue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="err"&gt;…&lt;/span&gt;
 &lt;span class="nl"&gt;"terms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Specifications as published by Kelin. Please cite the series page when reusing the data."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"978252077a05"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nl"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;"slug"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"hotel-bedding-sets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="err"&gt;…&lt;/span&gt;
   &lt;span class="nl"&gt;"series"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nl"&gt;"slug"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"bedding-plain-white"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Plain White Series"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"name_zh"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"纯白系列"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://kelintextile.design/products/hotel-bedding-sets/plain-white/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"hs_codes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"6302.31 (woven cotton, embroidered, unprinted); …"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="err"&gt;…&lt;/span&gt;
     &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Kelin 2026 product catalogue, p.6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"columns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="s2"&gt;"Fabric"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"Style"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"Features"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"Hotel Grade"&lt;/span&gt;
     &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
     &lt;span class="nl"&gt;"models"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"KL-BS01"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="nl"&gt;"values"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Fabric"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"300TC 100% Cotton"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"Style"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Oxford"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"Features"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"5 cm flange, plain white"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"Hotel Grade"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"3–4-star"&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="err"&gt;…&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where two published sources give different values for one field, the model keeps one value and the other goes into &lt;code&gt;also_listed_as&lt;/code&gt;, so nothing is silently dropped. The &lt;code&gt;terms&lt;/code&gt; field is the one sentence we ask reusers to follow: cite the series page.&lt;/p&gt;

&lt;h2&gt;
  
  
  The CSV: long format
&lt;/h2&gt;

&lt;p&gt;Columns differ between series. A bedding set has Fabric, Style and Hotel Grade; a duvet has TC, Fill Type and Fill Weight. Across the catalogue there are 28 distinct attributes. A wide table would be mostly empty cells and would gain a column every time a new series added one.&lt;/p&gt;

&lt;p&gt;So the CSV is long format, one row per model attribute. The header is fixed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="n"&gt;category&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;series_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;also_listed_as&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;series_name_zh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;category_name_zh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;hs_codes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;cn_tariff_codes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four real rows (the first eight of the twelve columns; each row continues with the Chinese names and the HS codes):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="nc"&gt;Hotel&lt;/span&gt; &lt;span class="nc"&gt;Bedding&lt;/span&gt; &lt;span class="nc"&gt;Sets&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nc"&gt;Plain&lt;/span&gt; &lt;span class="nc"&gt;White&lt;/span&gt; &lt;span class="nc"&gt;Series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//kelintextile.design/products/hotel-bedding-sets/plain-white/,KL-BS01,Fabric,300TC 100% Cotton,,"Kelin 2026 product catalogue, p.6",…&lt;/span&gt;
&lt;span class="nc"&gt;Hotel&lt;/span&gt; &lt;span class="nc"&gt;Bedding&lt;/span&gt; &lt;span class="nc"&gt;Sets&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nc"&gt;Plain&lt;/span&gt; &lt;span class="nc"&gt;White&lt;/span&gt; &lt;span class="nc"&gt;Series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//kelintextile.design/products/hotel-bedding-sets/plain-white/,KL-BS01,Style,Oxford,,"Kelin 2026 product catalogue, p.6",…&lt;/span&gt;
&lt;span class="nc"&gt;Hotel&lt;/span&gt; &lt;span class="nc"&gt;Duvets&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nc"&gt;Feather&lt;/span&gt; &lt;span class="nc"&gt;Duvet&lt;/span&gt; &lt;span class="nc"&gt;Series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//kelintextile.design/products/hotel-duvets/feather-down/,GD-280TC-01,Fill Type,Goose Down,,"Kelin 2026 product catalogue, p.16",…&lt;/span&gt;
&lt;span class="nc"&gt;Hotel&lt;/span&gt; &lt;span class="nc"&gt;Duvets&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nc"&gt;Feather&lt;/span&gt; &lt;span class="nc"&gt;Duvet&lt;/span&gt; &lt;span class="nc"&gt;Series&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//kelintextile.design/products/hotel-duvets/feather-down/,GD-280TC-01,Fill Weight,200–280 gsm,,"Kelin 2026 product catalogue, p.16",…&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every row carries its own page URL and source, so a single row pasted somewhere else still says where it came from. The CSV is generated from the JSON object, never from the source file directly, so the two cannot disagree. When we needed the Chinese names and HS codes, we appended four columns at the end and left the existing order alone, because the mirror build described below reads them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version = content hash
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;version&lt;/code&gt; is not a date or a counter. It is the first 12 hex digits of a SHA-256 over the categories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sha256'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'hex'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anyone can recompute it from the downloaded file. In Python, &lt;code&gt;json.dumps&lt;/code&gt; with compact separators reproduces &lt;code&gt;JSON.stringify&lt;/code&gt; for this data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;
&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"kelin-hotel-linen-catalog.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ensure_ascii&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;separators&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;","&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;":"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sha256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two consequences we rely on. Rebuilding or redeploying the site without a data change gives the same version. And a copy that has been altered or truncated no longer matches its own version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Copies that update only when the hash changes
&lt;/h2&gt;

&lt;p&gt;The files are mirrored to a &lt;a href="https://github.com/agenthaulk/kelin-hotel-linen-catalog" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;, together with a &lt;code&gt;README.md&lt;/code&gt;, a &lt;code&gt;CITATION.cff&lt;/code&gt; and a Frictionless &lt;code&gt;datapackage.json&lt;/code&gt;. The same build writes a &lt;a href="https://agenthaulk.github.io/kelin-hotel-linen-catalog/" rel="noopener noreferrer"&gt;GitHub Pages site&lt;/a&gt; with one page per category and an Atom feed of releases. A &lt;a href="https://huggingface.co/datasets/kelintextile/hotel-linen-catalog" rel="noopener noreferrer"&gt;Hugging Face copy&lt;/a&gt; carries the two files and a dataset card that loads the CSV as the default configuration.&lt;/p&gt;

&lt;p&gt;A weekly GitHub Actions job (Mondays) downloads the live files, recomputes the hash, regenerates the expected CSV rows from the JSON and compares them with the downloaded CSV, then rebuilds the mirror. The mirror build depends only on its inputs, never on today's date, so an unchanged dataset produces identical files and no commit. A release tagged &lt;code&gt;v-&amp;lt;version&amp;gt;&lt;/code&gt; is cut only when that tag does not exist yet. At the time of writing there are four releases.&lt;/p&gt;

&lt;h2&gt;
  
  
  schema.org Dataset on the landing page
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://kelintextile.design/data/" rel="noopener noreferrer"&gt;data page&lt;/a&gt; describes the files for people and carries a &lt;code&gt;Dataset&lt;/code&gt; node for machines. As emitted, trimmed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Dataset"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"https://kelintextile.design/data/#dataset"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Kelin Textile hotel linen catalogue"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Series and model tables published by Nantong Kelin Textile Co., Ltd. … Please cite the series page when reusing the data."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"https://kelintextile.design/data/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"978252077a05"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"variableMeasured"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Application"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Colour"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Construction"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Fabric"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"Yarn Count"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"distribution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"DataDownload"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"encodingFormat"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"contentUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"https://kelintextile.design/data/kelin-hotel-linen-catalog.json"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"DataDownload"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"encodingFormat"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"text/csv"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"contentUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"https://kelintextile.design/data/kelin-hotel-linen-catalog.csv"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;variableMeasured&lt;/code&gt; is simply the list of attribute names, and &lt;code&gt;version&lt;/code&gt; is the same hash as in the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the page and the machine layer in agreement
&lt;/h2&gt;

&lt;p&gt;Duplicated facts drift. Our answer is a set of checks that run inside every &lt;code&gt;astro build&lt;/code&gt; (as an integration, so they also run when someone calls &lt;code&gt;astro build&lt;/code&gt; directly). A few of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a series page has exactly one &lt;code&gt;Product&lt;/code&gt; per table row, each tied to a row id that exists on the page, and every &lt;code&gt;sku&lt;/code&gt; appears in the visible text;&lt;/li&gt;
&lt;li&gt;every URL on our domain in the markup exists in the build;&lt;/li&gt;
&lt;li&gt;the dataset &lt;code&gt;version&lt;/code&gt; is a 12-hex hash and the CSV header is exactly the one above;&lt;/li&gt;
&lt;li&gt;the HS codes printed on a page belong to that page's entries;&lt;/li&gt;
&lt;li&gt;every address in a URL baseline file, including both data files and &lt;code&gt;llms.txt&lt;/code&gt;, is still served.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also decided what the machine layer may contain. Some text is meant for page readers only, and the checks fail the build if it shows up in the dataset or in &lt;code&gt;llms.txt&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stable URLs
&lt;/h2&gt;

&lt;p&gt;The file names carry no version. &lt;code&gt;kelin-hotel-linen-catalog.json&lt;/code&gt; is the current data; the version lives inside it. Links in search indexes, READMEs and other people's notebooks keep working, and the URL baseline check makes removing an address a deliberate decision rather than an accident.&lt;/p&gt;

&lt;h2&gt;
  
  
  llms.txt
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://kelintextile.design/llms.txt" rel="noopener noreferrer"&gt;&lt;code&gt;llms.txt&lt;/code&gt;&lt;/a&gt; follows the llmstxt.org layout and is built from the same projection as the pages: a title with the legal name, a one-paragraph summary, company facts with their sources, the main pages, every category with its series and a one-line summary, the guides, the language versions, and a Data section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Data
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;[Catalogue dataset](https://kelintextile.design/data/): what the files contain, attributes and version
&lt;span class="k"&gt;- &lt;/span&gt;[Catalogue dataset, JSON](https://kelintextile.design/data/kelin-hotel-linen-catalog.json): every series and model table as data, with page URLs and sources
&lt;span class="k"&gt;- &lt;/span&gt;[Catalogue dataset, CSV](https://kelintextile.design/data/kelin-hotel-linen-catalog.csv): one row per model attribute, with page URL and source
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;llms-full.txt&lt;/code&gt; adds the model tables and the FAQ. &lt;code&gt;robots.txt&lt;/code&gt; lets search, AI-answer and training crawlers in and only hides &lt;code&gt;/api/&lt;/code&gt;, &lt;code&gt;/admin/&lt;/code&gt; and a click counter.&lt;/p&gt;

&lt;h2&gt;
  
  
  HS codes as a join key
&lt;/h2&gt;

&lt;p&gt;Customs declarations and trade statistics are keyed by HS code, not by product name. Each series carries &lt;code&gt;hs_codes&lt;/code&gt; (6-digit Harmonized System) and &lt;code&gt;cn_tariff_codes&lt;/code&gt; (8-digit China customs tariff), each with the condition that decides it, for example &lt;code&gt;6302.31 (woven cotton flat or fitted bed sheets, unprinted, without embroidery)&lt;/code&gt;. The 6-digit prefix is the same in every country that uses the Harmonized System, so it is the column to join on. Split the field on &lt;code&gt;;&lt;/code&gt; and take the code before the parenthesis. The full table, with names in Chinese and Russian, is in our &lt;a href="https://kelintextile.design/guides/hs-codes-hotel-linen/" rel="noopener noreferrer"&gt;HS codes guide&lt;/a&gt; (HS 2022; China customs tariff 2026).&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Keep one source file and generate pages, data files, markup and &lt;code&gt;llms.txt&lt;/code&gt; from it in the same build.&lt;/li&gt;
&lt;li&gt;Use long-format CSV when attributes vary by product family, and put the source and page URL on every row.&lt;/li&gt;
&lt;li&gt;Version by content hash, and release copies only when the hash changes.&lt;/li&gt;
&lt;li&gt;Fail the build when the visible page and the machine layer disagree.&lt;/li&gt;
&lt;li&gt;Keep file URLs stable and put the version inside the file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The files are at &lt;a href="https://kelintextile.design/data/" rel="noopener noreferrer"&gt;https://kelintextile.design/data/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>seo</category>
      <category>json</category>
      <category>structureddata</category>
    </item>
  </channel>
</rss>
