Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.
/ hexo-yuidoc Public archive

Generate YUIDoc with Hexo

License

Notifications You must be signed in to change notification settings

hexojs/hexo-yuidoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Generate YUIDoc with Hexo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published