Development of the TechDocs CLI has moved back to the backstage/backstage monorepo.
See you there, friends!
Former repository housing the utility CLI for managing TechDocs sites in Backstage (now in the main backstage/backstage monorepo)
Home Page: https://github.com/backstage/backstage/tree/master/packages/techdocs-cli
License: Apache License 2.0
Development of the TechDocs CLI has moved back to the backstage/backstage monorepo.
See you there, friends!
The serve
command seems to start the mkdocs
server at port 8000
and Backstage app on 3000
.
▶ /Users/himanshum/workspace/github.com/backstage/techdocs-cli/packages/techdocs-cli/bin/techdocs-cli serve
[techdocs-preview-bundle] Running local version of Backstage at http://localhost:3000
INFO - Building documentation...
WARNING - Config value: 'dev_addr'. Warning: The use of the IP address '0.0.0.0' suggests a production environment or the use of a proxy to connect to the MkDocs server. However, the MkDocs' server is intended for local development purposes only. Please use a third party production-ready server instead.
INFO - Cleaning site directory
INFO - Documentation built in 0.17 seconds
[I 201221 12:56:11 server:335] Serving on http://0.0.0.0:8000
INFO - Serving on http://0.0.0.0:8000
[I 201221 12:56:11 handlers:62] Start watching changes
INFO - Start watching changes
[I 201221 12:56:11 handlers:64] Start detecting changes
INFO - Start detecting changes
[I 201221 12:56:12 handlers:135] Browser Connected: http://0.0.0.0:8000/
INFO - Browser Connected: http://0.0.0.0:8000/
[I 201221 12:56:12 handlers:82] Ignore: /usr/local/lib/python3.8/site-packages/mkdocs/templates/sitemap.xml
INFO - Ignore: /usr/local/lib/python3.8/site-packages/mkdocs/templates/sitemap.xml
However, visiting http://localhost:3000/docs/local/dev/env/
gives me a 404 page.
@hooloovooo What do you recommend?
The following warning shows up when previewing documentation.
I see the same thing in backstage as well and suspect it's related to recent backstage package dependency updates. I haven't looked into the underlying issue yet to know if it's in the CLI or perhaps @backstage/plugin-techdocs
(more likely). However, this particular warning does not seem like it should be displayed here. Might require maybe added a setting to disable it the techdocs-cli
can use.
what:
when running techdocs serve
it does not work
env:
MacOS 10.15.7
$ techdocs-cli --version
0.5.0
$ cat mkdocs.yml
site_name: 'site'
site_description: 'desc'
plugins:
- techdocs-core
nav:
- Overview:
- goal: 'overview/goal.md'
$ npx --version
6.14.13
logs:
$ techdocs-cli serve -v
info: Starting mkdocs server.
info: Waiting for mkdocs server to start...
verbose: [docker/mkdocs] INFO - Building documentation...
verbose: [docker/mkdocs] WARNING - Config value: 'dev_addr'. Warning: The use of the IP address '0.0.0.0' suggests a production environment or the use of a proxy to connect to the MkDocs server. However, the MkDocs' server is intended for local development purposes only. Please use a third party production-ready server instead.
verbose: [docker/mkdocs] INFO - Cleaning site directory
verbose: [docker/mkdocs] INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
verbose: [docker/mkdocs] - index.md
verbose: [docker/mkdocs] INFO - Documentation built in 0.23 seconds
verbose: [docker/mkdocs] Traceback (most recent call last):
verbose: [docker/mkdocs] File "/usr/local/bin/mkdocs", line 8, in <module>
verbose: [docker/mkdocs] sys.exit(cli())
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
verbose: [docker/mkdocs] return self.main(*args, **kwargs)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1062, in main
verbose: [docker/mkdocs] rv = self.invoke(ctx)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
verbose: [docker/mkdocs] return _process_result(sub_ctx.command.invoke(sub_ctx))
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
verbose: [docker/mkdocs] return ctx.invoke(self.callback, **ctx.params)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
verbose: [docker/mkdocs] return __callback(*args, **kwargs)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/mkdocs/__main__.py", line 173, in serve_command
verbose: [docker/mkdocs] serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 78, in serve
verbose: [docker/mkdocs] server = config['plugins'].run_event('serve', server, config=config, builder=builder)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/mkdocs/plugins.py", line 94, in run_event
verbose: [docker/mkdocs] result = method(item, **kwargs)
verbose: [docker/mkdocs] File "/usr/local/lib/python3.8/site-packages/mkdocs_monorepo_plugin/plugin.py", line 67, in on_serve
verbose: [docker/mkdocs] buildfunc = list(server.watcher._tasks.values())[0]['func']
verbose: [docker/mkdocs] AttributeError: 'LiveReloadServer' object has no attribute 'watcher'
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
error: mkdocs server did not start. Exiting. Try re-running command with -v option for more details.
Non zero exit code from child process
relevant issues:
mkdocs/mkdocs#2446
Although path-style urls are on track for deprecation for S3 buckets, they're still used for related providers like MinIO, etc.
Backstage itself has a configuration parameter to support reading from buckets using this format (s3ForcePathStyle
)
https://backstage.io/docs/features/techdocs/configuration
So it seems reasonable that a similar options might exist for techdocs-cli publish
It shows the "someone dropped the mic" error. Renaming it to something else fixes the problem.
Reproduce with techdocs-issue-with-ads.tar.gz.
techdocs-common now supports publishing to Azure Blob Storage. backstage/backstage#4017
Bumb the version in packages/techdocs-cli
and document how to use azureBlobStorage
in the README. Use AWS and GCS for inspiration.
We're missing linting in the current workflows. This should be added.
LS,
I've bumped our own pipelines to use the latest and greatest techdocs-cli in order to fix an issue we are facing described here: backstage/backstage#6069 (comment)
I updated from 0.3.1
to 0.6.0
and since then my pipelines break because the techdocs-cli does not support the --azureAccountKey parameter anymore. I can't find any documentation whether this is intentional or a bug, by my guess is that this is by accident since the documentation on the trunk still talks still contains this parameter.
To simply reproduce run:
npx @techdocs/[email protected] publish --publisher-type azureBlobStorage --azureAccountName accountName --azureAccountKey key --storage-name container --entity entity
This will result in the error: error: unknown option '--azureAccountKey'
or
npx @techdocs/[email protected] publish -h
I'm trying to execute npx @techdocs/cli generate --verbose
command but is failing with:
info: Using source dir /path/to/repos/techdocs-cli
info: Will output generated files in /path/to/repos/techdocs-cli/site
warn: The 'techdocs.generators.techdocs' configuration key is deprecated and will be removed in the future. Please use 'techdocs.generator' instead.
info: Generating documentation...
Failed to generate docs from /path/to/repos/techdocs-cli into /path/to/repos/techdocs-cli/site with error Cannot read property 'info' of undefined
Tried with args --verbose
--no-docker
and got the same result.
Repository used for docs: github.com/backstage/techdocs-cli
Versions:
$ npx @techdocs/cli --version
0.4.1
$ npx --version
6.14.13
$ node --version
v14.17.3
The error does not occur when building from master branch
Running techdocs-cli generate --no-docker --verbose
stopped working with the v0.3.6 release. If I roll back to v0.3.5, the same command works. Relevant logs:
info: Using source dir /home/runner/work/developer-portal/developer-portal
info: Will output generated files in /home/runner/work/developer-portal/developer-portal/site
verbose: Creating output directory if it does not exist.
Cannot read property 'getOptionalString' of undefined
The same error is observed by other users as per this message on Discord
Shouldn't the dist-types
folders be on the gitignore? I think you shouldn't check them in. Or is there a special reason to check them in here?
I have markdown content inside HTML tag.
For example, the following:
<div markdown="1">
This is a *Markdown* Paragraph.
</div>
...is rendered as:
<div>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>
For example, the following:
<div markdown = "1">
This is a *Markdown* Paragraph.
</div>
...is rendered as:
<div>
<p>= "1"></p>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>
Should be rendered as:
<div>
<p>This is a <em>Markdown</em> Paragraph.</p>
</div>
techdocs-cli --version 0.7.0
This seems not to be a bug of mkdocs. If I run mkdocs:serve
(version 1.2.2), I get the expected behaviour.
Only happens if I run techdocs-cli serve:mkdocs
The following is displayed when the project under use is in a path that contains spaces.
verbose: [docker/mkdocs] docker: invalid reference format.
verbose: [docker/mkdocs] See 'docker run --help'.
This line does not quote the path for the docker command. https://github.com/backstage/techdocs-cli/blob/main/packages/techdocs-cli/src/lib/mkdocsServer.ts#L36
Add single quotes around the content resolves the issue.
Trying to preview docs using techdocs cli and seeing an error message.
Command:
npx @techdocs/cli serve
Error:
ld: warning: object file (<path>) was built for newer macOS version (11.0) than being linked (10.13)
info: Starting mkdocs server.
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
info: Waiting for mkdocs server to start...
error: mkdocs server did not start. Exiting. Try re-running command with -v option for more details.
info: Serving docs in Backstage at http://localhost:3000/docs/default/component/local/
Opening browser.
The browser window opens and waits, then eventually becomes a blank screen. I'm assuming the server isn't running at all.
I have an mkdoc setup in a repo (external to my backstage repo). I'm trying to run techdocs-cli from a folder which contains mkdocs documentation but i get the following:
$ npx run @techdocs/cli serve
npx: installed 5 in 1.147s
Watching /Users/swistak/code/notifications and all sub-directories not excluded by your .gitignore. Will not monitor dotfiles.
Starting: @techdocs/cli serve
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/Users/swistak/code/notifications/@techdocs/cli'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I'm not sure if the repo containing docs needs to be an npm repo? Why? It appears that there's no dist
or src
folder in the cli uploaded to npm
Ref: backstage/backstage#2707 (comment)
techdocs-cli has a Backstage mono-repo in packages/embedded-techdocs which is used in the techdocs-cli serve
command. Instead of spinning up an entire Backstage app, we could just run a development environment of the TechDocs plugin. This feature was broken until recently for many months; and hence @hooloovooo and I decided to just go ahead with an embedded app.
But the embedded-techdocs way of serving TechDocs comes with a lot of complexity (mono-repo inside a mono-repo, the Backstage packages get outdated quickly, the custom APIs need to be adjusted...). So, investigate if it's possible to spin up just the TechDocs plugin for the techdocs-cli serve
command, without starting a Backstage app.
Add missing prettier step to workflows.
Unless I'm doing something horribly wrong, I'm under the impression @techdocs/[email protected]
is missing the dist
folder which results in the following
npx techdocs-cli generate
node:internal/modules/cjs/loader:357
throw err;
^
Error: Cannot find module '/Users/aris.plakias/Workspace/repos/product-licenses/node_modules/@techdocs/cli/dist/index.cjs.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:349:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:562:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:27)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/Users/aris.plakias/Workspace/repos/product-licenses/node_modules/@techdocs/cli/bin/techdocs-cli:25:3)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32) {
code: 'MODULE_NOT_FOUND',
path: '/Users/aris.plakias/Workspace/repos/product-licenses/node_modules/@techdocs/cli/package.json',
requestPath: '..'
As of now, the main workflow in GitHub actions https://github.com/backstage/techdocs-cli/blob/main/.github/workflows/main.yml will try to publish on every PR merge. If the version in packages/techdocs-cli/package.json
changes, the workflow will pass and a new package will be release.
But this leaves the main build broken all the time. We should improve this behavior.
Support for configuring the endpoint for aws publisher was added in backstage with backstage/backstage#4867 and should be added to techdocs-cli
when the next version of backstage is released.
Add an optional parameter awsEndpoint
to the publish command which the user can set when publisher type is set to awsS3
.
See #36 for additional reference.
In backstage/backstage#5260, we moved run-time checks for storage availability out of the Publisher::fromConfig
constructor and into a separate readiness method.
We should update to the version of techdocs-common
that includes this change, and when we do so, invoke the readiness method in the publish
command to provide the same error/success feedback that we provided previously.
Hi, @emmaindal, I have reported a vulnerability issue in package google-p12-pem.
As far as I am aware, vulnerability CVE-2020-7720 detected in package node-forge(<0.10.0) is directly referenced by [email protected], on which your package @techdocs/[email protected] transitively depends. As such, this vulnerability can also affect @techdocs/[email protected] via the following path:
@techdocs/[email protected] ➔ @backstage/[email protected] ➔ [email protected] ➔ @google-cloud/[email protected] ➔ @google-cloud/[email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected](vulnerable version)
Since google-p12-pem has released a new patched version [email protected] to resolve this issue ([email protected] ➔ [email protected](fix version)), then this vulnerability patch can be automatically propagated into your project only if you update your lockfile. The following is your new dependency path :
@techdocs/[email protected] ➔ @backstage/[email protected] ➔ [email protected] ➔ @google-cloud/[email protected] ➔ @google-cloud/[email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected] ➔ [email protected](vulnerability fix version)
.
A warm tip.^_^
Best regards,
Paimon
I'm unable to generate any documentation from the .md files. I tried with different ways and it always fail with the following error: Failed to generate docs from /input into input/site with error spawn mkdocs ENOENT
.
The following is a series of steps to reproduce this issue.
While on the console:
techdocs-cli generate --no-docker --verbose
.The output should be something like:
info: Using source /dir techdocs-container-main/mock-docs
info: Will output generated files in /techdocs-container-main/mock-docs/site
verbose: Creating output directory if it does not exist.
info: Generating documentation...
Failed to generate docs from /techdocs-container-main/mock-docs into /techdocs-container-main/mock-docs/site with error spawn mkdocs ENOENT
The command should generate the documentation and store it under the /site directory.
techdocs-cli: 0.7.0
mkdocs-techdocs-core: 0.1.2
mkdocs: 1.2.2
Edit: formating
Allow techdocs-cli publish
command to authenticate with AWS using roleArn
config.
Add an optional paramater awsRoleArn
to the publish command which the user can set when publisher type is set to awsS3
.
Split this config constructor block for awsS3
and googleGcs
publishers. In the awsS3
block, if awsRoleArn
is provided by the CLI user, assign it as credentials
(see config schema).
For reference, see how roleArn
is taken from config and passed to the AWS SDK for authentication.
Today I started getting:
Cannot find module '/home/runner/.npm/_npx/451/lib/node_modules/@techdocs/cli/dist/index.cjs.js'. Please verify that the package.json has a valid "main" entry
I've checked:
$ npm i @techdocs/[email protected]
$ ls node_modules/@techdocs/cli/dist
cjs esm index.cjs.js index.cjs.js.map index.d.ts index.esm.js index.esm.js.map techdocs-preview-bundle
$ ls node_modules/@techdocs/cli
bin CHANGELOG.md dist package.json README.md
$ npm i @techdocs/[email protected]
$ ls node_modules/@techdocs/cli/dist
ls: cannot access 'node_modules/@techdocs/cli/dist': No such file or directory
$ ls node_modules/@techdocs/cli
bin CHANGELOG.md package.json README.md
Looks like the new version release build failed.
While improving the tests in #169 (comment) occasionally the serve
process on port 8000 is not terminated, causing subsequent tests to fail, or trying to start the server locally.
The server has been observed to not terminate specifically when using then --no-docker
flag, although this is not 100% reproducible. Without the --no-docker
flag we weren't able to reproduce this behaviour yet.
Worth noting: in #169 we bumped the usage of latest TechDocs common package, and use the default docker image provided by it
This is a follow-up from
Possibly related:
npx @techdocs/cli serve --no-docker
or npx @techdocs/cli serve:mkdocs--no-docker
SIGTERM
techdocs-cli serve --no-docker
or techdocs-cli serve:mkdocs--no-docker
SIGTERM
Running techdocs-cli serve --no-docker
serves up a blank page with error in the devtools console (See below)
TechDocs preview should load the content and not show a white blank page.
Blank Page with the following error in the devtools console
react-dom.production.min.js:209
Error: No implementation available for apiRef{plugin.search.queryservice}
at u (index.esm.js:51)
at B (index-9c0d67e6.esm.js:154)
at Yi (react-dom.production.min.js:153)
at wo (react-dom.production.min.js:261)
at pu (react-dom.production.min.js:246)
at fu (react-dom.production.min.js:246)
at ru (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)
at Bl (react-dom.production.min.js:122)
to @ react-dom.production.min.js:209
n.payload @ react-dom.production.min.js:227
di @ react-dom.production.min.js:129
Ua @ react-dom.production.min.js:179
wo @ react-dom.production.min.js:263
pu @ react-dom.production.min.js:246
fu @ react-dom.production.min.js:246
ru @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
Bl @ react-dom.production.min.js:122
ql @ react-dom.production.min.js:123
$l @ react-dom.production.min.js:122
wu @ react-dom.production.min.js:257
t.unstable_runWithPriority @ scheduler.production.min.js:19
Bl @ react-dom.production.min.js:122
bu @ react-dom.production.min.js:257
(anonymous) @ react-dom.production.min.js:256
F @ scheduler.production.min.js:17
_.port1.onmessage @ scheduler.production.min.js:14
react-dom.production.min.js:209
Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at Ou (react-dom.production.min.js:275)
at react-dom.production.min.js:148
at Aa (react-dom.production.min.js:182)
at Ua (react-dom.production.min.js:181)
at wo (react-dom.production.min.js:263)
at pu (react-dom.production.min.js:246)
at fu (react-dom.production.min.js:246)
at ru (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)
to @ react-dom.production.min.js:209
n.callback @ react-dom.production.min.js:226
pi @ react-dom.production.min.js:131
ao @ react-dom.production.min.js:212
vu @ react-dom.production.min.js:255
t.unstable_runWithPriority @ scheduler.production.min.js:19
Bl @ react-dom.production.min.js:122
gu @ react-dom.production.min.js:248
ru @ react-dom.production.min.js:239
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:19
Bl @ react-dom.production.min.js:122
ql @ react-dom.production.min.js:123
$l @ react-dom.production.min.js:122
wu @ react-dom.production.min.js:257
t.unstable_runWithPriority @ scheduler.production.min.js:19
Bl @ react-dom.production.min.js:122
bu @ react-dom.production.min.js:257
(anonymous) @ react-dom.production.min.js:256
F @ scheduler.production.min.js:17
_.port1.onmessage @ scheduler.production.min.js:14
scheduler.production.min.js:14
Uncaught Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at Ou (react-dom.production.min.js:275)
at react-dom.production.min.js:148
at Aa (react-dom.production.min.js:182)
at Ua (react-dom.production.min.js:181)
at wo (react-dom.production.min.js:263)
at pu (react-dom.production.min.js:246)
at fu (react-dom.production.min.js:246)
at ru (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)
Either install latest version of techdocs-cli @ version 0.8.3 or run npx @techdocs/cli serve --no-docker
inside a techdocs repo
When performing local preview of techdocs content, we prefer to run it through the techdocs-cli preview without the performance impact of running docker.
When running the preview with docker, the preview works fine.
This issue seems similar to a past issue here: backstage/backstage#2135
MacOS 10.15.7
Node v14.17.0
npm v6.14.13
techdocs-cli v0.8.3
Docker command doesn’t support single quote for argument. It causes an error :
docker: Error response from daemon: invalid mode: /content
This error can be fixed by replacing single quote by double quote at
I can provide a PR for this.
First time trying techdocs-cli on an existing mkdocs project. Installed 0.3.5 of techdocs-cli
The mkdocs project renders and serves fine with techdocs-cli serve:mkdocs
However with the just the 'serve' command it starts to render the Backstage UI in the browser, then errors:
JSConsole shows:
Error: Missing required config value at 'integrations.github'
at b.getConfigArray (index.esm.js:104)
at index.esm.js:240
at index.esm.js:973
at Array.forEach (<anonymous>)
at J (index.esm.js:972)
at index.esm.js:1104
at ro (react-dom.production.min.js:211)
at gu (react-dom.production.min.js:257)
at e.unstable_runWithPriority (scheduler.production.min.js:19)
at Wl (react-dom.production.min.js:122)
The rendered js looks like:
const addGitFeedbackLink = (configApi) => {
return (dom) => {
const sourceAnchor = dom.querySelector('[title="Edit this page"]');
if (!sourceAnchor || !sourceAnchor.href) {
return dom;
}
let gitHost = "";
const sourceURL = new URL(sourceAnchor.href);
const githubHosts = configApi.getConfigArray("integrations.github").map((integration) => integration.data.host);
const gitlabHosts = configApi.getConfigArray("integrations.gitlab").map((integration) => integration.data.host);
if (githubHosts.includes(sourceURL.hostname) || sourceURL.origin.includes("github")) {
gitHost = "github";
} else if (gitlabHosts.includes(sourceURL.hostname) || sourceURL.origin.includes("gitlab")) {
gitHost = "gitlab";
} else {
return dom;
}
const title = dom.querySelector("article>h1").childNodes[0].textContent;
const issueTitle = encodeURIComponent(`Documentation Feedback: ${title}`);
const issueDesc = encodeURIComponent(`Page source:
${sourceAnchor.href}
Feedback:`);
const repoPath = sourceURL.pathname.split("/").slice(0, 3).join("/");
const feedbackLink = sourceAnchor.cloneNode();
switch (gitHost) {
case "gitlab":
feedbackLink.href = `${sourceURL.origin}${repoPath}/issues/new?issue[title]=${issueTitle}&issue[description]=${issueDesc}`;
break;
case "github":
feedbackLink.href = `${sourceURL.origin}${repoPath}/issues/new?title=${issueTitle}&body=${issueDesc}`;
break;
default:
return dom;
}
ReactDOM.render(React.createElement(FeedbackOutlinedIcon), feedbackLink);
feedbackLink.style.paddingLeft = "5px";
feedbackLink.title = "Leave feedback for this page";
feedbackLink.id = "git-feedback-link";
sourceAnchor == null ? void 0 : sourceAnchor.insertAdjacentElement("beforebegin", feedbackLink);
return dom;
};
node --version
v16.0.0
OSX Big Sur
Latest Chrome
Private gitlab repo, also
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.