Code Monkey home page Code Monkey logo

minami's Introduction

Minami

A clean, responsive documentation template theme for JSDoc 3.

Minami Screenshot

Uses

Install

$ npm install --save-dev minami

Usage

Clone repository to your designated jsdoc template directory, then:

$ jsdoc entry-file.js -t path/to/minami

Node.js Dependency

In your projects package.json file add a generate script:

"scripts": {
  "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
}

In your .jsdoc.json file, add a template option.

"opts": {
  "template": "node_modules/minami"
}

Example JSDoc Config

{
    "tags": {
        "allowUnknownTags": true,
        "dictionaries": ["jsdoc"]
    },
    "source": {
        "include": ["lib", "package.json", "README.md"],
        "includePattern": ".js$",
        "excludePattern": "(node_modules/|docs)"
    },
    "plugins": [
        "plugins/markdown"
    ],
    "templates": {
        "cleverLinks": false,
        "monospaceLinks": true,
        "useLongnameInNav": false,
        "showInheritedInNav": true
    },
    "opts": {
        "destination": "./docs/",
        "encoding": "utf8",
        "private": true,
        "recurse": true,
        "template": "./node_modules/minami"
    }
}

Specifying a number for useLongnameInNav it will be the max number of path elements to show in nav (starting from Class).

License

Licensed under the Apache2 license.

minami's People

Contributors

brianpeiris avatar cherryblossom000 avatar d2s avatar dryajov avatar harrysarson avatar kribblo avatar mjhost avatar nataliewolfe avatar nijikokun avatar seapunk avatar stfsy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minami's Issues

EISDIR: Illegal operation on directory

On generating output files,
Came across this error when publish.js tries copying files,

'/home/akshitgrover/projects/express/alterset/node_modules/minami/static/fonts/OpenSans-Bold-webfont.eot' -> 'docs/alterset/1.0.0/fonts
I fixed this issue, Should I open a pull request for the same?

API generator

Hi,

Your theme is quite interesting. I have tried to generate with my Rest API. However, as you mentioned it hasn't completed yes. Please finish API part.
Thanks,
Trung.

Every method shows up twice in output

No idea why it happens, but it appears to happen with every method. Both duplicates are the same, except that one has the correct example, while one has the example from the previous method.

Add padding-bottom to nav element

Without padding on the bottom of the nav element, the lower-left URL preview displayed by most browsers obfuscates the bottom element:

This can be prevented by adding:

nav {
    ...
    padding-bottom: 20px;
}

Custom tag not working

I create an new tag ..

exports.defineTags = function (dictionary) {
  dictionary.defineTag("topic", {
    mustHaveValue: true,
    canHaveType: false,
    canHaveName: true,
    onTagged: function (doclet, tag) {
      doclet.topic = tag.value;
    }
  });
};

Inclide in my jsdoc.json ..

{
  "tags": {
    "allowUnknownTags": true,
    "dictionaries": ["jsdoc"]
  },
  "source": {
    "include": ["package.json", "README.md"],
    "includePattern": ".js$",
    "excludePattern": "(node_modules/|docs)"
  },
  "plugins": [
    "plugins/markdown",
    "./jsdoc/topic.js" // HERE
  ],
  "opts": {
    "template": "./node_modules/minami",
    "encoding": "utf8",
    "destination": "docs/",
    "recurse": true,
    "verbose": true
  },
  "templates": {
    "cleverLinks": false,
    "monospaceLinks": true,
    "useLongnameInNav": false,
    "showInheritedInNav": true
  }
}

Added into my code

  • @topic to/robot/{MAC_ADDRESS}

But nothing change in doc

FATAL: Unable to load template: Cannot find module 'taffydb'

I get this error when trying to build. I followed the instructions in the readme, and initially everything worked as expected. I don't know what changed that could be causing this error. Looking at the package.json, I don't see any dependencies declared, so it makes sense that this error would happen here. This also means that I don't know why this template worked in the first place.

module support

Great theme you've made here!

Any change there will be support for @modules or @packages? Where each package have it's own classes?

I'm working on a meteor project, and it would be really great if I could use this theme for it's documentation. Meteor packages are comparable to node_modules. Lets for example say you've got two packages, and both package have a object called "Config". You'll definately wish to keep them separate in the documentation.

Like (sidebar visualisation):

CLASSES
  myClass      # class
    initialize # method

PACKAGES
  cars         # package
    config     # class
      get      # method
  boats        # package
    config     # class
      get      # method

GLOBALS
  myGlobal     # global

Duplicate "Requires" sections in classes

Hi,
I've noticed that when documenting a class with jsdoc using minami as template, there is two Requires sections.
Here is an example:

MyClass

MyClass

new MyClass()

My description

Source:
Requires:

Requires

Methods

...

By modifying tmpl/container.tmpl line 75 from:

<?js if (doc.requires && doc.requires.length) { ?>
    <h3 class="subsection-title">Requires</h3>

    <ul><?js doc.requires.forEach(function(r) { ?>
        <li><?js= self.linkto(r, r) ?></li>
    <?js }); ?></ul>
<?js } ?>

To:

<?js if (doc.kind === 'module' && doc.requires && doc.requires.length) { ?>
    <h3 class="subsection-title">Requires</h3>

    <ul><?js doc.requires.forEach(function(r) { ?>
        <li><?js= self.linkto(r, r) ?></li>
    <?js }); ?></ul>
<?js } ?>

It has the expected behavior with classes and seems to not alter modules.
Hope it could help ;)

Responsive sizing is not working properly on Chrome desktop + mobil

I generated some docs using Minami (thank you by the way -- much nicer than the default style) and have looked them on both my PC and online and the responsive sizing just isn't working properly -- at some point it stops shrinking and just cuts off the sides of the page which causes some text from the documentation to not be displayed at all and most of the hamburger/menu button is also hidden.

This also occurs in Chrome's Dev Tools, although the tools also make it slightly worse than it actually is.

Edit: title typo (mobil instead of mobile).

publish 1.1.1 to npm

hi. As far as i've seen 1.1.1 introduces the sticky nav. Could you publish that version to npm?

Add viewport meta tag to layout.tmpl

Your media query for the mobile version is not applied on mobile devices with high resolution, because without setting width to device-width, width returns the absolute size of the display in px.

Solution

    <meta name="viewport" content="width=device-width,initial-scale=1">

List child tutorials

Currently, minami only lists the top level tutorials, and an option to show child tutorials in the nav as well would be really helpful. I don't know if this is a limitation of jsdoc; if that's the case, I'll open a feature request there.

Sub link is invalid when module name has chinese word

code :

define([],
   /** @module my/ๅ“ˆๅ›‰ */
    function() {
        return {
            /** The module' `hello` property. */
            hello: function(){  
            },
        };
    }
);

generate :

<h3>Modules</h3>
    <ul>
      <li>
        <a href="module-my_%25E5%2593%2588%25E5%259B%2589.html">my/ๅ“ˆๅ›‰</a>
        <ul class='methods'>
          <li data-type='method'>
            <a href="module-my_%2525E5%252593%252588%2525E5%25259B%252589.html#~hello">hello</a>
          </li>
        </ul>
      </li>
    </ul>

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.