google / typedoc-neo-theme Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Building with:
lang ❯ typedoc --theme /Users/crucialfelix/.nvm/versions/node/v10.15.1/lib/node_modules/typedoc-neo-theme/bin/default
(globally installed neo-theme)
creates a front page:
file:///Users/crucialfelix/code/supercolliderjs/docs/packages/lang/docs/index.html
The generated source contains items in .tsd-navigation-primary
that populate the sidebar:
<li class=" tsd-kind-external-module">
<a href="modules/_sclang_.html" style="display:none">sclang</a>
</li>
These links are correct (but invisible). Each module is surrounded with _
modulename_
.html
But this is then rendered to the DOM (by frontend javascript AFAICT) as:
<a href="modules/sclang.html">sclang</a>
ie:
file:///Users/crucialfelix/code/supercolliderjs/docs/packages/lang/docs/modules/sclang.html
Without the surrounding underscores. Which is 404
Hello, I am using the following setup:
TypeDoc 0.20.37
TypeScript 4.1.2
node v14.17.2
typedoc-neo-theme 1.1.1
And I have the following tsconfig.json
{
"compileOnSave": false,
"typedocOptions": {
"entryPoints": ["src"],
"theme": "node_modules/typedoc-neo-theme/bin/default",
"plugin":"typedoc-neo-theme",
"out": "docs",
},
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2019",
"typeRoots": [ "node_modules/@types" ],
"lib": [ "ES2015", "dom" ],
"skipLibCheck": true,
"paths": {
"@app/*": [ "src/*" ],
"@environments/*": [ "src/environments/*" ]
}
}
}
The problem is, when I run npx typedoc
I get the following structure
And here's my folder structure
.
└── project/
├── src/
│ ├── apis
│ ├── menus
│ ├── models
│ ├── pages
│ └── utils
├── tests
└── node_modules
There have been a number of bugs around the novel navigation scheme for this theme, see #40. There should be some tests developed to ensure the behavior of this module as well as detect and prevent regressions.
When using theme, I got following error:
Error: Cannot find module '@gerrit0/typedoc/dist/lib/converter/components'
Require stack:
- .../node_modules/typedoc-neo-theme/bin/default/plugin.js
When I tracked the issue, I found in plugin.ts
import { Component, ConverterComponent } from '@gerrit0/typedoc/dist/lib/converter/components'
However @gerrit0/typedoc
is not listed by any dependencies in package.json
.
Should it be
import { Component, ConverterComponent } from 'typedoc/dist/lib/converter/components'
or @gerrit0/typedoc
added to dependencies?
Thanks,
When updating to 1.0.3
docs are still being built but process exits with an error:
Error: The plugin /tmp/test/node_modules/typedoc-neo-theme could not be loaded.
Error: Cannot find module '@gerrit0/typedoc/dist/lib/converter/components'
Require stack:
- /tmp/test/node_modules/typedoc-neo-theme/bin/default/plugin.js
- /tmp/test/node_modules/typedoc-neo-theme/index.js
- /tmp/test/node_modules/typedoc/dist/lib/utils/plugins.js
- /tmp/test/node_modules/typedoc/dist/lib/utils/index.js
- /tmp/test/node_modules/typedoc/dist/lib/serialization/components.js
- /tmp/test/node_modules/typedoc/dist/lib/serialization/index.js
- /tmp/test/node_modules/typedoc/dist/lib/application.js
- /tmp/test/node_modules/typedoc/dist/lib/cli.js
- /tmp/test/node_modules/typedoc/bin/typedoc
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /tmp/test/node_modules/typedoc-neo-theme/bin/default/plugin.js:33:26
at /tmp/test/node_modules/typedoc-neo-theme/bin/default/plugin.js:9:17
at Object.<anonymous> (/tmp/test/node_modules/typedoc-neo-theme/bin/default/plugin.js:15:3)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
I've set up a minimal repo for showcase here.
The README link "Visit the Actions on Google Node.js reference to view this theme." 404s
is:
https://actions-on-google.github.io/actions-on-google-nodejs/3.0.0/index.html
should be:
https://actions-on-google.github.io/actions-on-google-nodejs/3.0.0/docs/index.html
Thanks for fixing most of my problems, can you also deploy to npm so I can update it in my project? Thanks in advance:)
throw exception when run [email protected]
Here is my typedoc.json:
{
"out": "docs",
"target": "es6",
"mode": "modules",
"inputFiles": "src/index.ts",
"excludeNotExported": true,
"excludePrivate": true,
"theme": "./node_modules/typedoc-neo-theme/bin/default",
"plugin": "typedoc-neo-theme",
"outline": [{
"Actions SDK": {
"Overview": "actionssdk",
"api/v2": "actionssdk_api_v2"
},
"Dialogflow": {
"Overview": "dialogflow",
"api/v1": "dialogflow_api_v1",
"api/v2": "dialogflow_api_v2"
}
}]
}
I have made a PR #26 , please take a look and publish a new version. Thanks
These are the steps I am taking and the errors I am receiving:
$ npm i --save-dev typedoc-neo-theme
package.json
"typedoc": "^0.22.12",
"typedoc-neo-theme": "^1.1.1",
$ yarn build:theme
yarn run v1.22.17
error Command "build:theme" not found.
$ yarn build:plugin
yarn run v1.22.17
error Command "build:plugin" not found.
typedoc.json
{
"entryPoints": ["./app"],
"entryPointStrategy": "expand",
"out": "documentation",
"excludePrivate": false,
"excludeProtected": false,
"includeVersion": true,
"readme": "./README.md",
"sort": ["static-first", "visibility", "alphabetical", "enum-value-ascending"],
"cleanOutputDir": true,
"treatWarningsAsErrors": false,
"plugin": "typedoc-neo-theme",
"theme": "./node_modules/typedoc-neo-theme/bin/default"
}
$ ./node_modules/.bin/typedoc
Error: Invalid structure in plugin typedoc-neo-theme, no load function found.
Thoughts? helps?
Updated dependencies to latest of assistant/conversation
and yet https://actions-on-google.github.io/assistant-conversation-nodejs/3.6.0/index.html still has broken search. One error is the switch back from search.json
to search.js
but may need to do a deeper inspection.
ts: 3.7.5
typedoc: 0.16.11
documentation generated correctly, but links in the left panel changes by main.js to modules/_{moduleName}_.html
right panel and main body uses correct links
After a closer look, the initial HTML returned was correct
Before use
If you don't use typedoc-neo-theme
, the link is normal. It seems that typedoc-neo-theme
does something. . .
After use
After a closer look, the initial HTML returned was correct
But it changed after main.js
was run, and I don't know what happened. . .
I have communicated under typedoc before, but it feels like it should be a topic issue. . .
Reference: TypeStrong/typedoc#1147
I have a module called rxjs-bits
, and the link points to rxjs-bits.html, while it should point to rxjs_bits.html. Works fine with the default theme.
Hi,
Typedoc 0.17 has been released for a while now, with support for interesting features (like type only imports). I wanted to know if upgrade was on its way for this plugin ?
For instance, there is right now a dependency in package.json
which fixes typedoc to 0.16
branch:
https://github.com/google/typedoc-neo-theme/blob/master/package.json#L30
Thanks for your help and best regards.
Hi, this theme seems to be broken under latest typedoc
v21 (which just released like today).
> npx typedoc
Warning: typedoc-neo-theme uses a deprecated structure. Plugins should export a "load" function to be called with the Application
at Application.bootstrap ( [...] /node_modules/typedoc/dist/lib/application.js:156:17)
Info: Loaded plugin typedoc-neo-theme
Error: Cannot use 'in' operator to search for '[object object]' in undefined
Error: Cannot use 'in' operator to search for '[object object]' in undefined
I'm running with:
"typedoc": "^0.21.0",
"typedoc-neo-theme": "^1.1.1",
"typescript": "4.2"
Thanks!
Hello. I have noticed that on this theme, there are duplicate comment tags. For example, due to comments' short text being rendered into the documentation, the following code:
/**
* Connect to this store's respsective database
* @returns Was able to connect?
*/
abstract connect: () => Promise<boolean>;
creates this documentation, which contains duplicate @returns
sections due to the inclusion of both short text and tags:
Is there any way to solve this with some sort of configuration option?
TypeScript version: 3.7.5
TypeDoc version: 0.16.9
TypeDoc Neo Theme version: 1.0.5
Here's my TypeDoc configuration, in case that helps.
{
"mode": "modules",
"out": "docs",
"externalPattern": "node_modules/**/*.ts",
"excludeExternals": true,
"includeDeclarations": true,
"theme": "./node_modules/typedoc-neo-theme/bin/default",
"name": "DBPMStore Documentation",
"includeVersion": true,
"hideGenerator": true,
"plugin": "typedoc-neo-theme"
}
The main navigation and the index list is overflowing, causing the page to be zoomed out on mobile.
Hi,
I wanted to upgrade to release 1.0.5
, but there seems to be an issue with the way urls contained in the outline menu are now computed. This behavior happens when using references to resources which are not modules
.
Here is an example of an outline definition.
"typedocOptions": {
"out": "docs",
"name": "My Documentation",
"readme": "README.docs.md",
"mode": "modules",
"outline": [
{
"Main menu": {
"Something with classes": {
"Link 1": "classes/<suffix>"
}
}
}
]
}
From index.html
, if I click on the link, it will redirect to something like <base-url>/classes/<suffix>.html
But then, clicking again on the same link from this page will then redirect to a wrong url, using modules
path like <base-url>/modules/classes/<suffix>
In 1.0.4
, it was working perfectly fine.
Maybe related to this change :
https://github.com/google/typedoc-neo-theme/pull/20/files#diff-301d30ef180768244bd2d94c66dc9dc9R460
Could you help ?
Do we have a rough ETA when #41 will be pushed to npm at version 1.0.7?
Thanks!
Curently urls seem to be relative, so if i'm viewing a page in the enums
directory and then click on a link from the navigator I end up like this:
This is my outline config:
"outline": [
{
"Bits": {
"@reix/bits": "bits",
"@reix/rxjs-bits": "rxjs_bits",
"Usage with enums": "usageWithEnums",
"Usage with unions": "usageWithUnions",
"When to use this package": "whenToUseBits"
},
"Ecs": {
"@reix/ecs": "ecs"
},
"Dirty": {
"@reix/dirty": "dirty"
}
}
]
Hi typedoc-neo-theme team,
I was wondering if it is possible for the Navigation Menu to have a side scroll feature. When the theme uses the default outline structure, the texts from the navigation menu will overlay to the next text if text is too long. An example of the text overlay can be shown in #78
Thank you for considering this.
With typedoc mode set to "file" everything is ok.
But with typedoc mode set to "modules" menu links work only in the index page.
In fact, the URL seems missing the "modules" path.
Example:
Tested with:
Regards.
An JavaScript error in MenuSticky.ts
results in some components such as Signature not being initialized:
Seems to be caused by a wrong selector for the $navigation element, which selects no element. Later, the offset of that element is undefined
, and accessing the property left
of undefined
results in an error.
Go to actions-on-google-nodejs and open the dev tools:
"compact" is not an allowed value for option "style".
https://sass-lang.com/documentation/cli/dart-sass#style
Note: unixNewlines
has the same issue.
I currently use WebStorm to modify the JS / TS code, but the trouble is that I don't know what the configuration format of your code is, and everyone's configuration may be different?
Perhaps, where can I find Google's code specification configuration files, including WebStorm / VSCode?
Ref link:https://prettier.io/
TypeDoc v0.20 now emits a file modules.html
, which the default themes style as "Exports" instead of "Globals".
When specifying outline
in typedoc.json, this theme hardcodes "Globals" in the outline, resulting in a broken href. This is hardcoded in the default layout.
This theme should respect the new TypeDoc behavior and not generate links to files that don't exist.
New versions of Typedoc (0.20.x
) are available since few days.
Since this update I have problems with the generation of the documentation with several errors. However, if I use Typedoc version 0.19.2
everything is fine. I tried with the default theme and there were no errors when generating the documentation.
Output when I used Typedoc version 0.20.5
:
Info: Loaded plugin typedoc-neo-theme
Error: Tried to set an option (mode) that was not declared.
Error: Tried to set an option (includeDeclarations) that was not declared.
Error: Tried to set an option (entryPoint) that was not declared.
Error: Tried to set an option (excludeNotExported) that was not declared.
Error: Tried to set an option (stripInternal) that was not declared.
Error: Tried to set an option (ignoreCompilerErrors) that was not declared.
I use the following command to launch Typedoc:
typedoc --options typedoc.json --tsconfig tsconfig.json
This is my Typedoc configuration:
{
"mode": "modules",
"includeDeclarations": false,
"entryPoint": "",
"excludeExternals": false,
"excludeNotExported": false,
"excludePrivate": false,
"excludeProtected": false,
"stripInternal": false,
"ignoreCompilerErrors": true,
"media": "",
"includes": "",
"out": "docs",
"theme": "./node_modules/typedoc-neo-theme/bin/default",
"name": "PROJECT NAME",
"includeVersion": true,
"readme": "none",
"categorizeByGroup": true,
"exclude": [
"**/*+(index|.test|.spec|.e2e).ts"
],
"hideGenerator": true,
"listInvalidSymbolLinks": true,
"plugin": "typedoc-neo-theme",
"links": [],
"outline": [],
"search": [],
"source": []
}
Curently theres this markdown plugin, but to get it to work I need to create a file called pages.hbs
in the templates
directoty using the patch-package
package, which looks like this:
I don't know if adding support for an arbitrary plugin is a good idea for this project, but if you decide it is, could you add this change at the theme level?
Thanks in advance!
When using the code block syntax, the out contains duplicated code block.
For example:
var str = 'helloWorld!';
Generates "var str = 'helloWorld!'" twice.
Just noticed that you resolved that issue, but I don't see any new version that I can use, please bump version.
When running build:theme
Running "ts:themeDefault" (ts) task
Compiling...
Fast compile will not work when --out is specified. Ignoring fast compilation
Using tsc v3.5.3
../@types/babel__core/index.d.ts(13,20): error TS2307: Cannot find module '@babel/types'.
../@types/babel__core/index.d.ts(14,31): error TS2307: Cannot find module '@babel/parser'.
../@types/babel__generator/index.d.ts(10,20): error TS2307: Cannot find module '@babel/types'.
../@types/babel__template/index.d.ts(9,31): error TS2307: Cannot find module '@babel/parser'.
../@types/babel__template/index.d.ts(10,54): error TS2307: Cannot find module '@babel/types'.
../@types/babel__traverse/index.d.ts(10,20): error TS2307: Cannot find module '@babel/types'.
../@types/babel__traverse/index.d.ts(30,5): error TS2411: Property 'scope' of type 'Scope' is not assignable to string index type '(VisitNodeFunction<S, any> & VisitNodeObject<S, any>) | (VisitNodeFunction<S, any> & VisitNodeFunction<S, any>) | (VisitNodeObject<S, any> & VisitNodeObject<S, any>) | (VisitNodeObject<...> & VisitNodeFunction<...>)'.
../@types/babel__traverse/index.d.ts(31,5): error TS2411: Property 'noScope' of type 'boolean' is not assignable to string index type '(VisitNodeFunction<S, any> & VisitNodeObject<S, any>) | (VisitNodeFunction<S, any> & VisitNodeFunction<S, any>) | (VisitNodeObject<S, any> & VisitNodeObject<S, any>) | (VisitNodeObject<...> & VisitNodeFunction<...>)'.
I'm not understanding how to run typedoc with your plugin. Your documentation says build the theme yarn build:theme
and build the plugin yarn build:plugin
then run typedoc with the plugin
typedoc --theme ../../node_modules/typedoc-neo-theme/bin/default
yarn build:theme
doesn't work, yarn doesn't recognize that as a script. So I navigate to ./node_modules/typedoc-neo-theme
and run yarn build:theme
, but get errors that grunt doesn't exist in ./node_modules/.bin/grunt
.
So I yarn
in node_modules/typedoc-neo-theme
which feels like I'm doing something wrong. Then run yarn build:theme
again and get a ton of cannot find module errors, probably because I'm running the script from within your plugin, not my directory. Here's the first error I'm seeing, for example
../@types/aws-lambda/index.d.ts(66,15): error TS2307: Cannot find module './trigger/cognito-user-pool-trigger/' or its corresponding type declarations.
If I try to just run typedoc (from my project root) with your plugin via
./node_modules/.bin/typedoc --theme ../../node_modules/typedoc-neo-theme/bin/default
I get the following error
Error: The plugin /Users/brandonfleming/dev/bubbles/node_modules/typedoc-neo-theme could not be loaded.
Info: Error: Cannot find module './bin/default/plugin'
So what am I doing wrong?
The first thing I (personally) want to see when I navigate to a documentation theme repo is what the theme looks like. Would be nice if there were some screenshots/gifs added to do just that.
Will there be a support for dark mode in this theme?
Hi,
I tried this nice theme to document a custom node-red node, but I have found some issues.
My module has a neme (and it is into a directory) with a form as "my-module".
Files generated by typedoc are in the form "_my_module_otherstuff.html".
Links on the left of the page (in the navigation menu) are like: "my-module_otherstuff.html" (please note the "-" vs "").
Since with the default theme I have not this issue, I believe this could be a problem of your theme.
If not, please let me know so I'll open an issue on the typedoc issue tracker.
Since the list of left menu entries is very long, it goes over the footer, as shown in the image.
I have opened the browser developers console, and I have seen the following error:
TypeError: this.$navigation.offset(...) is undefined
Maybe the rendering problem is related to this error.
I am using Ubuntu 18.04 with the latest packages, Firefox 72.0.2 (64-bit), typedoc 0.16.9, typedoc-neo-theme 1.0.5.
By the way, I have installed the theme with the command:
npm install typedoc-neo-theme
and I generate the doc with:
node_modules/.bin/typedoc \
--options doc/typedoc.json \
--theme ./node_modules/typedoc-neo-theme/bin/default \
--plugin typedoc-neo-theme
Maybe am I missing something?
Thank you for your help.
Regards.
leker@fleker16:~/samples/typedoc-neo-theme/test$ yarn docs
yarn run v1.17.3
$ typedoc --options typedoc.json --theme node_modules/typedoc-neo-theme/bin/default
Error: Tried to set an option (links) that was not declared.
Error: Tried to set an option (outline) that was not declared.
Error: Tried to set an option (search) that was not declared.
Error: Tried to set an option (source) that was not declared.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
It'd be great if we could include paths to additional css and js files in the typedoc.json
file to be added to the built output.
This would allow us to tweak the CSS if needed, and add additional js functionality without having to fork the theme and having to maintain that.
Use GCB to generate this file to reduce verbosity and use GCB for final builds.
`ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / | | | | |/ _
| '__| | | | | | |
/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
Angular CLI: 7.3.4
Node: 10.16.0
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router
@angular-devkit/architect 0.8.9
@angular-devkit/build-angular 0.8.9
@angular-devkit/build-optimizer 0.8.9
@angular-devkit/build-webpack 0.8.9
@angular-devkit/core 0.8.9
@angular-devkit/schematics 7.3.4
@angular/cdk 7.3.7
@angular/cli 7.3.4
@angular/compiler-cli 7.2.7
@angular/language-service 7.2.7
@angular/material 7.3.7
@angular/material-moment-adapter 7.3.7
@ngtools/webpack 6.2.9
@schematics/angular 7.3.4
@schematics/update 0.13.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.16.4`
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.