Git Product home page Git Product logo

hexo-yuidoc's Introduction

hexo-yuidoc

Generate YUIDoc with Hexo.

Deprecated

It's not compatible with Hexo 3.

Install

$ npm install hexo-yuidoc --save

Usage

Requirements

You have to install YUIDoc first.

$ npm install yuidocjs -g

Generating

Generate raw data with YUIDoc first. Then, move data.json to source/_yuidoc folder. You can rename data.json to whatever you like. For example:

index.json => /api/classes/Class.html
foo.json => /api/foo/classes/Foo.html

Templates

You have to at least add two templates to the layout folder of the theme:

  • api/class
  • api/module

You can get the model from site.yuidoc and get the name of current yuidoc from page.yuidoc_name in templates.

Helpers

yuidoc_type

Gets the link of specified data types. You can use a string or an array. Multiple types will be separated by |. Besides classes in the database, you can also use native types.

<%- yuidoc_type('String') %>
<%- yuidoc_type(['String', 'Array']) %>

yuidoc_params

Generates a parameter list.

<%- yuidoc_params(params) %>

get_current_yuidoc

<% get_current_yuidoc() %>

Tags

You can use all tags and filters in your documentation.

crosslink

You can use crosslink to cross-reference other classes.

{% crosslink class/item:[type] [link text] %}

Options

You can configure this plugin in _config.yml.

yuidoc_dir: api
  • yuidoc_dir - Where generated files will be saved (Default: api)

hexo-yuidoc's People

Contributors

tommy351 avatar

Stargazers

 avatar  avatar

Watchers

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

hexo-yuidoc's Issues

hexo-yuidoc does not work with hexo 3.1.1

Hello,

hewo-yuidoc does not work with hexo 3.1.1: each time I run hexo generate it fails to load the plugin:

ERROR Plugin load failed: hexo-yuidoc
ReferenceError: hexo is not defined
    at Object.<anonymous> ([...]/test-yui/node_modules/hexo-yuidoc/lib/model.js:9:34)

Is there any solution?

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.