createArticle (filename) {
    filename = path.relative(confBase, filename);

    let source = fs.readFileSync(path.join(confBase, filename)).toString();
    const name = filename.replace(/(^[./]+)|([.][^.]*$)/g, '');

    const titleLine = source.match(/^[#\r\n]*(.+)([\r\n]|$)/);
    const title = titleLine ? titleLine[1].trim() : name;

    // the template layout adds the title to the html documetn so remove it
    // from the source
    if (titleLine) {
      source = source.substr(titleLine[0].length);
    }

    const article = {
      source,
      name,
      filename,
      title,
      longname: `article:${name}`,
      description: source,
      outfilename: `${name}.html`,
      kind: 'article',
    };

    templateHelper.registerLink(article.longname, article.outfilename);

    return article;
  }
/**
   * get the props for an article doclet including source and longname, then
   * register a link
   */
get the props for an article doclet including source and longname, then
register a link
get the props for an article doclet including source and longname then register a link
createArticle (filename) {
    filename = path.relative(confBase, filename);
    let source = fs.readFileSync(path.join(confBase, filename)).toString();
    const name = filename.replace(/(^[./]+)|([.][^.]*$)/g, '');
    const titleLine = source.match(/^[#\r\n]*(.+)([\r\n]|$)/);
    const title = titleLine ? titleLine[1].trim() : name;
    if (titleLine) {
      source = source.substr(titleLine[0].length);
    }
    const article = {
      source,
      name,
      filename,
      title,
      longname: `article:${name}`,
      description: source,
      outfilename: `${name}.html`,
      kind: 'article',
    };
    templateHelper.registerLink(article.longname, article.outfilename);
    return article;
  }
createArticle ( filename ) { filename = path . relative ( confBase , filename ) ; let source = fs . readFileSync ( path . join ( confBase , filename ) ) . toString ( ) ; const name = filename . replace ( / (^[./]+)|([.][^.]*$) / g , '' ) ; const titleLine = source . match ( / ^[#\r\n]*(.+)([\r\n]|$) / ) ; const title = titleLine ? titleLine [ 1 ] . trim ( ) : name ; if ( titleLine ) { source = source . substr ( titleLine [ 0 ] . length ) ; } const article = { source , name , filename , title , longname : ` ${ name } ` , description : source , outfilename : ` ${ name } ` , kind : 'article' , } ; templateHelper . registerLink ( article . longname , article . outfilename ) ; return article ; }
get the props for an article doclet including source and longname, then
 register a link
get the props for an article doclet including source and longname then register a link
// the template layout adds the title to the html documetn so remove it // from the source