Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2a9dd5a
chore(deps): update dependency markdownlint-cli to ^0.43.0 (#1301)
renovate[bot] Nov 25, 2024
d1ee201
try to fix CI and remove index page with a redirect
B4nan Nov 22, 2024
e8a4d83
try to fix CI 2
B4nan Nov 22, 2024
5a975f8
try to fix CI 3
B4nan Nov 25, 2024
ad810e5
try to fix CI
B4nan Nov 25, 2024
9003fa9
try to fix CI 5
B4nan Nov 25, 2024
d0e6aa4
try to fix CI 6
B4nan Nov 25, 2024
2a1a417
try to fix CI 7
B4nan Nov 25, 2024
2c013bc
try to fix CI 8
B4nan Nov 25, 2024
c19b53b
add openapi specs directly into the repository
B4nan Nov 25, 2024
2f02203
fix some linters
B4nan Nov 25, 2024
c21737b
fix more linters
B4nan Nov 25, 2024
88437f4
fix more linters?
B4nan Nov 25, 2024
3b74741
fix more linters
B4nan Nov 25, 2024
25fff4f
remove index page for the API
B4nan Nov 26, 2024
f17bca4
keep warnings for openapi spec errors
B4nan Nov 26, 2024
92226f8
feat: use `@docusaurus/faster` and `openapi-docs` canary
barjin Nov 26, 2024
db62597
use intro page on the `/v2-new` URL directly
B4nan Nov 26, 2024
a80497e
disable redirect
B4nan Nov 26, 2024
bf985de
Merge branch 'master' into new-api-docs
B4nan Nov 26, 2024
666581f
polish workflows
B4nan Nov 26, 2024
079d975
try to fix vale workflow
B4nan Nov 26, 2024
7496139
try to fix vale workflow 2
B4nan Nov 26, 2024
56e8192
try to fix vale workflow 3
B4nan Nov 26, 2024
647b74d
add badges to sidebar
B4nan Nov 27, 2024
e32b996
disable sidebar collapsing
B4nan Nov 27, 2024
c4ebaa2
fix main heading size
B4nan Nov 28, 2024
51287e8
rename top level `openapi` folder
B4nan Nov 28, 2024
db266b9
use inlined specs for redocusaurus
B4nan Nov 28, 2024
1679612
use redocusaurus on raw specs so we dont run decorators twice
B4nan Nov 28, 2024
a75b84b
use redocusaurus on raw specs so we dont run decorators twice
B4nan Nov 28, 2024
1564534
ignore openapi readmes in vale
B4nan Nov 28, 2024
64fe8f8
rebuild api docs on `npm start`
B4nan Nov 28, 2024
613e287
handle sidebar scrolling on state transitions
B4nan Nov 28, 2024
f0a43a6
handle sidebar scrolling on state transitions
B4nan Nov 28, 2024
6259df1
redirects for original URLs starting with `#reference/...`
B4nan Nov 28, 2024
5fa2cfa
deprecation PoC
B4nan Nov 29, 2024
c0df7a8
disallow indexing of `v2-new`
B4nan Nov 29, 2024
17e6018
sync changes from openapi repo and fix blank lines in index page
B4nan Nov 29, 2024
6b965e2
mark a few more deprecations
B4nan Nov 29, 2024
e9088e6
Merge branch 'master' into new-api-docs
B4nan Nov 29, 2024
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: 6 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Build docs
run: |
npm ci --force
Expand Down
87 changes: 49 additions & 38 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ jobs:
- name: Checkout Source code
uses: actions/checkout@v4

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
always-auth: 'true'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Install Dependencies
run: npm ci --force
env:
Expand All @@ -36,40 +40,43 @@ jobs:
name: Lint markdown content
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
**/*.md
**/*.mdx
separator: ","

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'package-lock.json'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Install Dependencies
run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: List and Lint Changed Markdown Files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
IFS=',' read -ra FILE_ARRAY <<< "$ALL_CHANGED_FILES"
for file in "${FILE_ARRAY[@]}"; do
npx markdownlint "$file"
done
- name: Checkout Source code
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: '**/*.{md,mdx}'
files_ignore: '!sources/api/*.{md,mdx}'
separator: ","

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Install Dependencies
run: npm ci --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: List and Lint Changed Markdown Files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
IFS=',' read -ra FILE_ARRAY <<< "$ALL_CHANGED_FILES"
for file in "${FILE_ARRAY[@]}"; do
npx markdownlint "$file"
done


lint_code:
Expand All @@ -79,15 +86,19 @@ jobs:
- name: Checkout Source code
uses: actions/checkout@v4

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
registry-url: 'https://npm.pkg.github.com/'
scope: '@apify-packages'

- name: Enable corepack
run: |
corepack enable

- name: Install Dependencies
run: npm ci --force
env:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/typos-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Typos Check

on:
pull_request:
branches: [master]
branches: [ master ]

jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master
with:
files: ./sources
- name: Check spelling
uses: crate-ci/typos@master
with:
files: ./sources
44 changes: 22 additions & 22 deletions .github/workflows/vale.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Vale

on: [pull_request]
on: [ pull_request ]

jobs:
lint:
runs-on: ubuntu-latest
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
**/*.{md,mdx}
separator: ","
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: '**/*.{md,mdx}'
files_ignore: '!sources/api/*.{md,mdx}'
separator: ","

- uses: errata-ai/vale-action@reviewdog
if: steps.changed-files.outputs.any_changed == 'true'
with:
files: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
fail_on_error: true
vale_flags: "--minAlertLevel=error"
reporter: github-pr-annotations
- uses: errata-ai/vale-action@reviewdog
if: steps.changed-files.outputs.any_changed == 'true'
with:
files: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
fail_on_error: true
vale_flags: "--minAlertLevel=error"
reporter: github-pr-annotations
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ yarn.lock
tmp
jsconfig.json
types
sources/api
sources/typedefs
.history
.docusaurus
tsconfig.tsbuildinfo
.turbo
apify-docs-theme/package-lock.json
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ extend-ignore-re = [

[default.extend-words]
SER = "SER"

[files]
extend-exclude = ['sources/api/*.mdx']
2 changes: 1 addition & 1 deletion apify-docs-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@apify/docs-search-modal": "^1.1.1",
"@docusaurus/theme-common": "^3.5.2",
"@docusaurus/theme-common": "3.6.2",
"@stackql/docusaurus-plugin-hubspot": "^1.1.0",
"axios": "^1.7.4",
"babel-loader": "^9.1.3",
Expand Down
7 changes: 6 additions & 1 deletion apify-docs-theme/src/theme/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ import React from 'react';
// cannot use any of the theme aliases here as it causes a circular dependency :( ideas welcome
import Layout from '@docusaurus/theme-classic/lib/theme/Layout/index';
import { usePluginData } from '@docusaurus/useGlobalData';
import useBaseUrl from '@docusaurus/useBaseUrl';
import { useLocation } from '@docusaurus/router';

export default function LayoutWrapper(props) {
const { options: { subNavbar } } = usePluginData('@apify/docs-theme');
const baseUrl = useBaseUrl('/');
const currentPath = useLocation().pathname.replace(new RegExp(`^${baseUrl}`), '');

return (
<div style={{
'--ifm-navbar-height': subNavbar ? '123px' : '68px',
'--ifm-navbar-height': subNavbar && !currentPath.startsWith('api/v2') ? '123px' : '68px',
'margin': 0,
'padding': 0,
'boxSizing': 'border-box',
Expand Down
56 changes: 56 additions & 0 deletions apify-docs-theme/src/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1619,3 +1619,59 @@ iframe[src*="youtube"] {
margin-top: -130px;
position: absolute;
}

.redocusaurus .openapi-clients-box {
display: block;
float: right;
padding-left: 6px;
}

.redocusaurus .openapi-clients-box-heading {
display: inline-block;
font-family: 'San Francisco', Helvetica, Arial, sans-serif;
color: #6C7590;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 20px;
text-transform: uppercase;
padding-bottom: 6px;
}

.redocusaurus .openapi-clients-box-icon {
display: block;
padding-bottom: 6px;
}

.theme-api-markdown .openapi-clients-box {
display: block;
float: right;
padding-left: 6px;
}

.theme-api-markdown .openapi-clients-box-heading {
display: inline-block;
font-family: 'San Francisco', Helvetica, Arial, sans-serif;
color: #6C7590;
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 20px;
text-transform: uppercase;
padding-bottom: 6px;
}

.theme-api-markdown .openapi-clients-box-icon {
display: block;
padding-bottom: 6px;
margin: 0 !important;
}

.theme-api-markdown .openapi__method-endpoint-path,
.theme-api-markdown .openapi-security__summary-header {
margin-top: 0;
}

.theme-api-markdown .prism-code .token-line::before {
display: none !important;
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: ['@docusaurus/babel/preset'],
plugins: ['babel-plugin-styled-components'],
};
Loading