Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport documentation versioning changes to 6.x #13253

Merged
merged 26 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5b9896f
chore(docs/source/api): add types for "out" and "data"
hasezoey Mar 29, 2023
74b9b3b
chore(docs/source/api): rename property "name" to "title"
hasezoey Mar 29, 2023
2c87aeb
chore(scripts/website): only promisify once
hasezoey Mar 29, 2023
cd659b9
chore(docs/source/index): change export to be in "fileMap" instead of…
hasezoey Mar 29, 2023
b612570
chore: update website to include api paths in filemap
hasezoey Mar 29, 2023
93d64f3
chore(docs/source/splitApiDocs): remove file
hasezoey Mar 29, 2023
88d0664
chore(scripts/website): add watching and reloading for api paths (and…
hasezoey Mar 29, 2023
89a9115
chore(scripts/generateSearch): only use the filemap
hasezoey Mar 29, 2023
43d6eb5
chore(generateSearch): api: replace custom url with direct filename
hasezoey Mar 29, 2023
3c62d87
chore(scripts/website): add log when starting of how many files are p…
hasezoey Mar 29, 2023
68f276b
chore(scripts/website): add better versioning support
hasezoey Mar 29, 2023
c2d6105
docs(layout): link to "index.html" when chaning version, instead of base
hasezoey Mar 29, 2023
f983181
docs: change pug files to use "versionedPath" for static things
hasezoey Mar 29, 2023
c0f8bfd
docs(layout): add latest version if current version is not latest
hasezoey Mar 29, 2023
aff0138
docs(scripts/website): add versioning for path in markdown wrap
hasezoey Mar 29, 2023
cb79bca
chore(scripts/website): fix deploying with non-latest version
hasezoey Mar 29, 2023
768ba3b
deps: add "fs-extra" dev-dependency
hasezoey Mar 29, 2023
90b5928
chore(scripts/website): deploy to versioned path with DOCS_DEPLOY
hasezoey Mar 29, 2023
14d1c2c
chore(scripts/static): add versioned path to the "listening on" message
hasezoey Mar 29, 2023
f853406
chore(gitignore): ignore versioned documentation paths
hasezoey Mar 29, 2023
c0b5d58
chore(scripts/website): add fallback if no tags are available
hasezoey Mar 29, 2023
aedd4e0
chore(workflows/documentation): add step to load all tags
hasezoey Mar 29, 2023
9cd0db8
chore(scripts/website): exempt "api.pug" from all api specific proces…
hasezoey Apr 6, 2023
379b308
docs(layout.pug): dont link to "/x.x/" if pastversion is currentversion
hasezoey Apr 6, 2023
aa8bb56
Merge branch '6.x' into unifyDocs6x
hasezoey Apr 6, 2023
217a129
docs(layout): fix "Schemas" not being highlighted when currently on page
hasezoey Apr 24, 2023
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: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
name: Test Generating Docs
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- run: git fetch --depth=1 --tags # download all tags for documentation

- name: Setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ docs/*.html
docs/tutorials/*.html
docs/typescript/*.html
docs/api/*.html
# the below excludes things like "0test.x" too, but gitignore does not have something like js regex "[0-9]+", so this is the best for future versions
docs/[0-9]*.x/
index.html

# Local Netlify folder
Expand All @@ -61,3 +63,6 @@ mongoose.tgz
mongoose-*.tgz

examples/ecommerce-netlify-functions/.netlify/state.json

notes.md
list.out
14 changes: 7 additions & 7 deletions docs/api.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ block content
div.api-nav-content
each item in docs
- if (!item.hideFromNav)
div.nav-item(id='nav-' + item.name)
div.nav-item(id='nav-' + item.title)
div.nav-item-title
a(href='./api/' + item.name.toLowerCase() + '.html')
| #{item.name}
a(href='./api/' + item.title.toLowerCase() + '.html')
| #{item.title}
ul.nav-item-sub
each prop in item.props
li
a(href='./api/' + item.name.toLowerCase() + '.html#' + prop.anchorId)
a(href='./api/' + item.title.toLowerCase() + '.html#' + prop.anchorId)
| #{prop.string}

each item in docs
Expand All @@ -29,9 +29,9 @@ block content
<a class="edit-docs-link" href="#{item.editLink}" target="_blank">
<img src="/docs/images/pencil.svg" />
</a>
h2(id=item.name, class="item-header")
a(href='#' + item.name)
| #{item.name}
h2(id=item.title, class="item-header")
a(href='#' + item.title)
| #{item.title}
ul
each prop in item.props
li
Expand Down
18 changes: 9 additions & 9 deletions docs/api_split.pug
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
extends layout

append style
link(rel="stylesheet", href="/docs/css/api.css")
script(src="/docs/js/api-bold-current-nav.js")
link(rel="stylesheet", href=`${versions.versionedPath}/docs/css/api.css`)
script(src=`${versions.versionedPath}/docs/js/api-bold-current-nav.js`)

block content
<a class="edit-docs-link" href="#{editLink}" target="_blank">
<img src="/docs/images/pencil.svg" />
<img src="#{versions.versionedPath}/docs/images/pencil.svg" />
</a>
h1 #{name}
h1 #{title}

include includes/native

div.api-nav
div.api-nav-content
each item in docs
- if (!item.hideFromNav || item.name === name)
div.nav-item(id='nav-' + item.name)
- if (item.name === name)
- if (!item.hideFromNav || item.title === title)
div.nav-item(id='nav-' + item.title)
- if (item.title === title)
div.nav-item-title(style="font-weight: bold")
a(href=item.fileName + '.html')
| #{item.name}
| #{item.title}
ul.nav-item-sub
each prop in item.props
li
Expand All @@ -29,7 +29,7 @@ block content
- else
div.nav-item-title
a(href=item.fileName + '.html')
| #{item.name}
| #{item.title}

div.api-content
ul
Expand Down
27 changes: 14 additions & 13 deletions docs/includes/favicon.pug
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
link(rel='apple-touch-icon', sizes='57x57', href='images/favicon/apple-icon-57x57.png')
link(rel='apple-touch-icon', sizes='60x60', href='images/favicon/apple-icon-60x60.png')
link(rel='apple-touch-icon', sizes='72x72', href='images/favicon/apple-icon-72x72.png')
link(rel='apple-touch-icon', sizes='76x76', href='images/favicon/apple-icon-76x76.png')
link(rel='apple-touch-icon', sizes='114x114', href='images/favicon/apple-icon-114x114.png')
link(rel='apple-touch-icon', sizes='120x120', href='images/favicon/apple-icon-120x120.png')
link(rel='apple-touch-icon', sizes='144x144', href='images/favicon/apple-icon-144x144.png')
link(rel='apple-touch-icon', sizes='152x152', href='images/favicon/apple-icon-152x152.png')
link(rel='apple-touch-icon', sizes='180x180', href='images/favicon/apple-icon-180x180.png')
link(rel='icon', type='image/png', sizes='192x192', href='images/favicon/android-icon-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='images/favicon/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='96x96', href='images/favicon/favicon-96x96.png')
link(rel='icon', type='image/png', sizes='16x16', href='images/favicon/favicon-16x16.png')
link(rel='apple-touch-icon', sizes='57x57', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-57x57.png`)
link(rel='apple-touch-icon', sizes='60x60', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-60x60.png`)
link(rel='apple-touch-icon', sizes='72x72', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-72x72.png`)
link(rel='apple-touch-icon', sizes='76x76', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-76x76.png`)
link(rel='apple-touch-icon', sizes='114x114', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-114x114.png`)
link(rel='apple-touch-icon', sizes='120x120', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-120x120.png`)
link(rel='apple-touch-icon', sizes='144x144', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-144x144.png`)
link(rel='apple-touch-icon', sizes='152x152', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-152x152.png`)
link(rel='apple-touch-icon', sizes='180x180', href=`${versions.versionedPath}/docs/images/favicon/apple-icon-180x180.png`)
link(rel='icon', type='image/png', sizes='192x192', href=`${versions.versionedPath}/docs/images/favicon/android-icon-192x192.png`)
link(rel='icon', type='image/png', sizes='32x32', href=`${versions.versionedPath}/docs/images/favicon/favicon-32x32.png`)
link(rel='icon', type='image/png', sizes='96x96', href=`${versions.versionedPath}/docs/images/favicon/favicon-96x96.png`)
link(rel='icon', type='image/png', sizes='16x16', href=`${versions.versionedPath}/docs/images/favicon/favicon-16x16.png`)
link(rel='manifest', href=`${versions.versionedPath}/docs/images/favicon/manifest.json`)
2 changes: 1 addition & 1 deletion docs/includes/native.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
append style
script(type="text/javascript" src="//m.servedby-buysellads.com/monetization.custom.js")
link(rel="stylesheet", href="/docs/css/inlinecpc.css")
link(rel="stylesheet", href=`${versions.versionedPath}/docs/css/inlinecpc.css`)

#native-direct
script.
Expand Down
Loading