Skip to content
Snippets Groups Projects
Commit f3933e84 authored by Lars Trieloff's avatar Lars Trieloff
Browse files

#14 added title of schema

parent 0357a8f6
Branches airoha_bl
No related tags found
No related merge requests found
--- ---
template: reference template: reference
foo: bar foo: bar
--- ---
# Abstract
--- ---
\ No newline at end of file
--- ---
template: reference template: reference
foo: bar foo: bar
--- ---
# Definitions
--- ---
\ No newline at end of file
--- ---
template: reference template: reference
foo: bar foo: bar
--- ---
# Example
--- ---
\ No newline at end of file
--- ---
template: reference template: reference
foo: bar foo: bar
--- ---
# Simple
--- ---
\ No newline at end of file
--- ---
template: reference template: reference
foo: bar foo: bar
--- ---
# Subdir
--- ---
\ No newline at end of file
...@@ -19,7 +19,7 @@ function render([ template, context ]) { ...@@ -19,7 +19,7 @@ function render([ template, context ]) {
} }
function build(total, fragment) { function build(total, fragment) {
return total + '\n' + fragment.replace(/\n\n/g, '\n'); return total + fragment.replace(/\n\n/g, '\n');
} }
function assoc(obj, key, value) { function assoc(obj, key, value) {
...@@ -38,12 +38,13 @@ const generateMarkdown = function(filename, schema, schemaPath, outDir, dependen ...@@ -38,12 +38,13 @@ const generateMarkdown = function(filename, schema, schemaPath, outDir, dependen
dependencyMap:dependencyMap dependencyMap:dependencyMap
}; };
console.log(schema.metaElements); console.log(schema);
// this structure allows us to have separate templates for each element. Instead of having // this structure allows us to have separate templates for each element. Instead of having
// one huge template, each block can be built individually // one huge template, each block can be built individually
const multi = [ const multi = [
[ 'frontmatter.ejs', { meta: schema.metaElements } ], [ 'frontmatter.ejs', { meta: schema.metaElements } ],
[ 'header.ejs', { title: schema.title } ],
//[ 'divider.ejs', null ], //[ 'divider.ejs', null ],
//[ 'topSchema.ejs', ctx ], //[ 'topSchema.ejs', ctx ],
[ 'divider.ejs', null ] [ 'divider.ejs', null ]
......
<% /**
* Copyright 2017 Adobe Systems Incorporated. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/ %>
# <%=title %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment