Git Product home page Git Product logo

capacitor-docgen's Issues

Use markdown link instead of <a> element

Currently we are busy refactoring the Capacitor Google Maps plugin. One of the improvements is better documentation. The fork (WIP) can be found here: https://github.com/DutchConcepts/capacitor-google-maps/tree/next

I use docsify to generate an organized documentation website based on the markdown documentation (can be found in the ./docs folder in that fork). The API reference is generated with this plugin. This works really well, for which I commend you ๐Ÿ‘.

The generated website (GitHub pages) can be found here.

As can be seen, the links generated by docgen are broken, because they are a <a> element instead of a markdown link.

It would be solved by changing:
<code><a href="#foobar">FooBar</a></code>
to
<code>[FooBar](#foobar)</code>

The docsify team said the following:

You need generate markdown syntax. Such as

[MyClass](#MyClass)

It will not be compiled if it is HTML.

Therefore I hope it can be solved in this plugin. As far as I can see now, I don't think this change does have any drawbacks, so it would make sense to implement it like this. But please do share your opinion about this.

bug: wrong `reference types` in community plugins

The generated value in reference types always has the prefix @capacitor. However, community plugins have a different scope or no scope at all.

Example (see https://github.com/robingenz/capacitor-firebase/blob/main/packages/authentication/README.md#examples):

/// <reference types="@capacitor/firebase-authentication" />

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  plugins: {
    FirebaseAuthentication: {
      skipNativeAuth: false,
      providers: ["apple.com", "google.com"],
    },
  },
};

export default config;

/// <reference types="@capacitor/firebase-authentication" /> should be /// <reference types="@capacitor-firebase/authentication" />.

Apple requires privacy descriptions to be specified in Info.plist for location information:

@capacitor/geolocation

https://capacitorjs.com/docs/apis/geolocation#ios

We need to add this manually to the info.plist file. I hope you'll add this to the Capacitor doc:

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>

bug: Non-accessible APIs from external dependencies are part of the output

Hi,
thank you very much for this helpful generator.
I have the following problem since version 0.1.1:
APIs of external dependencies are included, which are not available via the plugin API (definitions.ts).

Here you can find an example: https://github.com/robingenz/capacitor-firebase-authentication/pull/122/files

In this project I have increased the version of docgen to 0.1.1 and updated the markdown. There are now many interfaces included (partly also twice), which are not available at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.