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

Add docs/source/api to docs/source/index filemap AND add better versioning support #13222

Merged
merged 23 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9ec9368
chore(docs/source/api): add types for "out" and "data"
hasezoey Mar 29, 2023
94ffdcc
chore(docs/source/api): rename property "name" to "title"
hasezoey Mar 29, 2023
061faed
chore(scripts/website): only promisify once
hasezoey Mar 29, 2023
a3ca8d0
chore(docs/source/index): change export to be in "fileMap" instead of…
hasezoey Mar 29, 2023
5cdb5f5
chore: update website to include api paths in filemap
hasezoey Mar 29, 2023
3415a91
chore(docs/source/splitApiDocs): remove file
hasezoey Mar 29, 2023
4a03cc3
chore(scripts/website): add watching and reloading for api paths (and…
hasezoey Mar 29, 2023
6a40844
chore(scripts/generateSearch): only use the filemap
hasezoey Mar 29, 2023
1bca88e
chore(generateSearch): api: replace custom url with direct filename
hasezoey Mar 29, 2023
9efeff2
chore(scripts/website): add log when starting of how many files are p…
hasezoey Mar 29, 2023
b51f527
chore(scripts/website): add better versioning support
hasezoey Mar 29, 2023
c26db23
docs(layout): link to "index.html" when chaning version, instead of base
hasezoey Mar 29, 2023
5584e16
docs: change pug files to use "versionedPath" for static things
hasezoey Mar 29, 2023
712c5df
docs(layout): add latest version if current version is not latest
hasezoey Mar 29, 2023
ebf55e0
docs(scripts/website): add versioning for path in markdown wrap
hasezoey Mar 29, 2023
9493922
chore(scripts/website): fix deploying with non-latest version
hasezoey Mar 29, 2023
ede4e3a
deps: add "fs-extra" dev-dependency
hasezoey Mar 29, 2023
1529ddb
chore(scripts/website): deploy to versioned path with DOCS_DEPLOY
hasezoey Mar 29, 2023
0840b28
chore(scripts/static): add versioned path to the "listening on" message
hasezoey Mar 29, 2023
b84e3e4
chore(gitignore): ignore versioned documentation paths
hasezoey Mar 29, 2023
d05d21f
chore(scripts/website): add fallback if no tags are available
hasezoey Mar 29, 2023
89844e9
chore(workflows/documentation): add step to load all tags
hasezoey Mar 29, 2023
0a6f9af
Merge branch 'master' into unifyDocs
hasezoey Apr 3, 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@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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 @@ -64,4 +66,4 @@ mongoose-*.tgz
examples/ecommerce-netlify-functions/.netlify/state.json

notes.md
list.out
list.out
20 changes: 10 additions & 10 deletions docs/api_split.pug
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
extends layout

append style
link(rel="stylesheet", href="/docs/css/api.css")
script(src="/docs/js/api-bold-current-nav.js")
script(src="/docs/js/convert-old-anchorid.js")
link(rel="stylesheet", href=`${versions.versionedPath}/docs/css/api.css`)
script(src=`${versions.versionedPath}/docs/js/api-bold-current-nav.js`)
script(src=`${versions.versionedPath}/docs/js/convert-old-anchorid.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 @@ -30,7 +30,7 @@ block content
- else
div.nav-item-title
a(href=item.fileName + '.html')
| #{item.name}
| #{item.title}

div.api-content
ul
Expand Down
28 changes: 14 additions & 14 deletions docs/includes/favicon.pug
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
link(rel='apple-touch-icon', sizes='57x57', href='/docs/images/favicon/apple-icon-57x57.png')
link(rel='apple-touch-icon', sizes='60x60', href='/docs/images/favicon/apple-icon-60x60.png')
link(rel='apple-touch-icon', sizes='72x72', href='/docs/images/favicon/apple-icon-72x72.png')
link(rel='apple-touch-icon', sizes='76x76', href='/docs/images/favicon/apple-icon-76x76.png')
link(rel='apple-touch-icon', sizes='114x114', href='/docs/images/favicon/apple-icon-114x114.png')
link(rel='apple-touch-icon', sizes='120x120', href='/docs/images/favicon/apple-icon-120x120.png')
link(rel='apple-touch-icon', sizes='144x144', href='/docs/images/favicon/apple-icon-144x144.png')
link(rel='apple-touch-icon', sizes='152x152', href='/docs/images/favicon/apple-icon-152x152.png')
link(rel='apple-touch-icon', sizes='180x180', href='/docs/images/favicon/apple-icon-180x180.png')
link(rel='icon', type='image/png', sizes='192x192', href='/docs/images/favicon/android-icon-192x192.png')
link(rel='icon', type='image/png', sizes='32x32', href='/docs/images/favicon/favicon-32x32.png')
link(rel='icon', type='image/png', sizes='96x96', href='/docs/images/favicon/favicon-96x96.png')
link(rel='icon', type='image/png', sizes='16x16', href='/docs/images/favicon/favicon-16x16.png')
link(rel='manifest', href='/docs/images/favicon/manifest.json')
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