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
1 change: 0 additions & 1 deletion docs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ description: Look up Base documentation with a compact directory-grouped index b
- [Base Chain](./base-chain/llms.txt) — Start here for Base Chain docs, including concepts, network reference, node operation, APIs, and protocol specifications.
- [Get Started](./get-started/llms.txt)
- [Ledgers](./ledgers/llms.txt) — An introduction to Base Ledgers, the enterprise way to run confidential payments that settle on Base.
- [Static](./static/llms.txt)

## Tools available for AI assistants

Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/docs-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CONSTANTS = {

skipDirs: [
'node_modules', '.git', 'dist', 'build', 'coverage',
'.next', 'images', 'videos', 'logo', 'openapi', '.claude', 'snippets'
'.next', 'images', 'videos', 'logo', 'openapi', '.claude', 'snippets', 'static'
],

extensions: ['.md', '.mdx'],
Expand Down
18 changes: 15 additions & 3 deletions scripts/lint-mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,20 @@ function checkMintlifyComponents(content, filePath) {
// Valid callout components
const validCallouts = ["Note", "Tip", "Warning", "Info", "Check"];

function collectTagText(start) {
let text = lines[start];
let end = start;
while (!text.includes(">") && end + 1 < lines.length) {
end += 1;
text += `\n${lines[end]}`;
}
return text;
}

for (let i = 0; i < lines.length; i++) {
const line = lines[i];
const startsSupportedTag = /<(Step|Tab|Accordion|Card|CardGroup|ParamField|ResponseField|Frame|Steps|Tabs|AccordionGroup|img)(\s|>|$)/.test(line);
const tagText = startsSupportedTag ? collectTagText(i) : line;

// Check for HTML comments
if (line.includes("<!--")) {
Expand All @@ -274,11 +286,11 @@ function checkMintlifyComponents(content, filePath) {
}

// Check opening tags
const openTagMatch = line.match(/<(Step|Tab|Accordion|Card|CardGroup|ParamField|ResponseField|Frame|Steps|Tabs|AccordionGroup)(\s[^>]*)?\/?>/);
const openTagMatch = tagText.match(/<(Step|Tab|Accordion|Card|CardGroup|ParamField|ResponseField|Frame|Steps|Tabs|AccordionGroup)(\s[^>]*)?\/?>/);
if (openTagMatch) {
const tag = openTagMatch[1];
const attrs = openTagMatch[2] || "";
const isSelfClosing = line.includes("/>");
const isSelfClosing = tagText.includes("/>");

// Check required attributes
if (requiredAttrs[tag]) {
Expand Down Expand Up @@ -328,7 +340,7 @@ function checkMintlifyComponents(content, filePath) {
}

// Check for img without alt
if (line.includes("<img") && !line.includes("alt=")) {
if (tagText.includes("<img") && !tagText.includes("alt=")) {
issues.push({
line: i + 1,
severity: "warning",
Expand Down