Skip to content
Open
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
9 changes: 9 additions & 0 deletions .github/workflows/validate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.33.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'

- name: Install Node dependencies
run: pnpm install --frozen-lockfile

- name: Post initial status comment
id: initial-comment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.iws
.idea_modules/
out/
node_modules/
images/.DS_Store
.DS_Store
.env/
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact=true
min-release-age=3
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "mintlify-docs",
"version": "1.0.0",
"description": "Lightdash documentation",
"private": true,
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/lightdash/mintlify-docs.git"
},
"type": "commonjs",
"dependencies": {
"gray-matter": "^4.0.3"
}
}
91 changes: 91 additions & 0 deletions pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minimumReleaseAge: 4320
16 changes: 13 additions & 3 deletions scripts/check-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

const fs = require('fs');
const path = require('path');
const matter = require('gray-matter');

const CHECK_EXTERNAL = process.argv.includes('--external');

Expand Down Expand Up @@ -41,6 +42,11 @@ function findMDXFiles(dir, fileList = []) {
return fileList;
}

function hasDraftTitle(content) {
const title = matter(content).data.title;
return typeof title === 'string' && title.toLowerCase().includes('draft');
}

function extractLinks(content, filePath) {
const links = [];

Expand Down Expand Up @@ -282,9 +288,13 @@ async function main() {

const mdxFiles = findMDXFiles('.');
const excludedPaths = ['node_modules', '.git', 'CONTRIBUTING.md'];
const filteredFiles = mdxFiles.filter(file =>
!excludedPaths.some(excluded => file.includes(excluded))
);
const filteredFiles = mdxFiles.filter(file => {
if (excludedPaths.some(excluded => file.includes(excluded))) {
return false;
}

return !hasDraftTitle(fs.readFileSync(file, 'utf8'));
});

const brokenLinks = [];
const externalLinks = [];
Expand Down
2 changes: 1 addition & 1 deletion timezones-draft.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Working with timezones in Lightdash"
title: "Draft: Working with timezones in Lightdash"
description: "Hidden draft: how to model warehouse data and use Lightdash so that timezones behave predictably."
hidden: true
---
Expand Down
Loading