Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ clone:

steps:
- name: build
image: livingdocs/docker-node:20.10
image: livingdocs/docker-node:28-22
volumes:
- name: dockersocket
path: /var/run/docker.sock
Expand All @@ -20,7 +20,7 @@ steps:
from_secret: DOCKER_PASSWORD

- name: release
image: livingdocs/semantic-release:v2.1.1
image: livingdocs/semantic-release:v3.0.3
environment:
GH_TOKEN:
from_secret: GH_TOKEN
Expand All @@ -39,7 +39,7 @@ name: tag

steps:
- name: tag
image: livingdocs/docker-node:20.10
image: livingdocs/docker-node:28-22
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
Expand All @@ -57,6 +57,6 @@ trigger:

---
kind: signature
hmac: 0231cb8f4527ace551e9aba128384e49eb769c91c6521f6f4e3073b828398eec
hmac: 14b59a09279d47928fb83dedfe6de5ace7e75f64e14ad53f5e9bbe0e8ce53640

...
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM livingdocs/node:18 as builder
FROM livingdocs/node:26 as builder
ADD package*.json /app/
WORKDIR /app
RUN apk add --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo && npm ci
Expand Down
25 changes: 0 additions & 25 deletions Taxonomy.md

This file was deleted.

7 changes: 4 additions & 3 deletions bin/add-menu.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const files = require('glob').sync('**/*.md', {
import fs from 'fs'
import {globSync} from 'glob'

const files = globSync('**/*.md', {
nodir: true,
absolute: true
})
Expand Down
8 changes: 4 additions & 4 deletions bin/build-index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs')
const {Parser} = require('htmlparser2')
const {DomHandler} = require('domhandler')
const {getText, hasAttrib, getAttributeValue, textContent} = require('domutils')
import fs from 'fs'
import {Parser} from 'htmlparser2'
import {DomHandler} from 'domhandler'
import {getText, hasAttrib, getAttributeValue, textContent} from 'domutils'

buildIndex('./public/search.json')

Expand Down
14 changes: 7 additions & 7 deletions bin/compress.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const fs = require('fs')
const glob = require('glob')
const zlib = require('zlib')
const pipe = require('util').promisify(require('stream').pipeline)
import fs from 'fs'
import {globSync} from 'glob'
import zlib from 'zlib'
import {pipeline} from 'stream/promises'

const isCompressed = /\.(gz|br)$/

function doGzip(file) {
if (isCompressed.test(file)) return
const source = fs.createReadStream(file)
const destination = fs.createWriteStream(`${file}.gz`)
return pipe(
return pipeline(
source,
zlib.createGzip({
level: 9
Expand All @@ -22,7 +22,7 @@ function doBrotli(file) {
if (isCompressed.test(file)) return
const source = fs.createReadStream(file)
const destination = fs.createWriteStream(`${file}.br`)
return pipe(
return pipeline(
source,
zlib.createBrotliCompress({
params: {
Expand All @@ -34,7 +34,7 @@ function doBrotli(file) {
)
}

const files = glob.sync('./public/**/*', {nodir: true, absolute: true})
const files = globSync('./public/**/*', {nodir: true, absolute: true})
console.log(`Run compression on ${files.length} files`)
Promise.all([Promise.all(files.map(doGzip)), Promise.all(files.map(doBrotli))]).then(() =>
console.log(`Compressed`)
Expand Down
13 changes: 6 additions & 7 deletions bin/download-images.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict'
const glob = require('glob')
const fs = require('fs/promises')
const fsSync = require('fs')
const path = require('path')
const https = require('https')
import {globSync} from 'glob'
import fs from 'fs/promises'
import fsSync from 'fs'
import path from 'path'
import https from 'https'

const githubImageRegex = /https:\/\/user-images\.githubusercontent\.com\/[^"\)\s]+/g

Expand All @@ -19,7 +18,7 @@ async function downloadImage(url, outputPath) {
}

async function processFiles() {
const files = glob.sync('content/**/*.md', {cwd: path.resolve(__dirname, '../')})
const files = globSync('content/**/*.md', {cwd: path.resolve(import.meta.dirname, '../')})

for (const file of files) {
const content = await fs.readFile(file, 'utf-8')
Expand Down
4 changes: 2 additions & 2 deletions bin/generate-release-changes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
const fs = require('fs')
const {parseArgs} = require('util')
import fs from 'fs'
import {parseArgs} from 'util'

const MAX_RETRIES = 5
const RETRY_DELAY = 1000
Expand Down
4 changes: 2 additions & 2 deletions bin/generate-unified-docs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const fs = require('fs')
const path = require('path')
import fs from 'fs'
import path from 'path'

/**
* Script to generate a unified documentation file from all markdown files used for AI input via MCP
Expand Down
4 changes: 2 additions & 2 deletions content/_content.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Generate redirects within hugo using the nginx redirect map
Expose releases.json for https://downstreams.cluster.livingdocs.io/
{{ $.AddResource (
dict
"content" (dict "mediaType" "application/json" "value" ($.Site.Data.releases | jsonify))
"content" (dict "mediaType" "application/json" "value" (hugo.Data.releases | jsonify))
"path" "releases.json"
)
}}

{{ $versions := partialCached "_api-versions" $ true }}
{{ if eq $.Site.BuildDrafts false }}{{ $versions = where $versions "upcoming" "eq" false }}{{ end }}
{{ if hugo.IsProduction }}{{ $versions = where $versions "upcoming" "eq" false }}{{ end }}
{{ hugo.Store.Set "api-versions" $versions }}

{{ $endpoints := partialCached "_api-endpoints" $ true }}
Expand Down
4 changes: 2 additions & 2 deletions content/reference/public-api/_content.gotmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- To iterate over a map
range (sort $.Site.Data.endpoints)
range (sort hugo.Data.endpoints)
-->
{{ $endpoints := partialCached "_api-endpoints" $ true }}

{{ $sectionsStat := os.Stat "data/sections.yaml" }}
{{ range $section := $.Site.Data.sections }}
{{ range $section := hugo.Data.sections }}
<!-- warnf (string ($section | jsonify)) -->
<!-- warnf (string $section.title) -->

Expand Down
2 changes: 1 addition & 1 deletion hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
languageCode: en-us
locale: en-us
theme: hugo-docs
uglyURLs: false
refLinksErrorLevel: ERROR
Expand Down
99 changes: 51 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"name": "livingdocs",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"dependencies": {
"clipboard": "^2.0.11",
"domhandler": "^5.0.3",
"domutils": "^3.2.2",
"glob": "^13.0.0",
"htmlparser2": "^10.0.0",
"domhandler": "^6.0.1",
"domutils": "^4.0.2",
"glob": "^13.0.6",
"htmlparser2": "^12.0.0",
"lunr": "^2.3.9",
"serve": "^14.2.4"
"serve": "^14.2.6"
},
"scripts": {
"build": "./bin/build.sh",
Expand Down
Loading