Skip to content

OpportunityLiu/hexo-renderer-ts

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

hexo-renderer-ts

hexo renderer for typescript files.

Options

See https://www.typescriptlang.org/docs/handbook/compiler-options.html

In _config.yml:

render:
  ts:
    target: ES2015
    removeComments: true
    newLine: Lf
    pretty: false

Or from tsconfig.json file

render:
  ts: tsconfig.json # path to tsconfig.json file

Or by API:

hexo.render.render({text: '', engine: 'ts'}, {
  target: 'ES2015',
  removeComments: true, 
  newLine: 'Lf', 
  pretty: false}).then(function(result){
  // ...
});