GithubHelp home page GithubHelp logo

documentation-theme-default's People

Contributors

anandthakker avatar jfirebaugh avatar sunbox avatar tmcw avatar wooorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

documentation-theme-default's Issues

Drop handlebars/mustache

Trying to implement meta tag support was the final thing here, I just don't buy it. Switch to ejs or such.

Write realer tests

Now that this will be a module with actual logic, there should be proper tests.

anchors for all heading levels

Is there any reason not to add anchors for all heading levels? The code now adds them only to h3 headings: site.js, line 5

I was trying to create a link to a h2 heading in a block of markdown, and discovered this.

I guess the generated html uses only h3 headings, but it would be nice to accommodate github-style markdown links to headings, where other heading levels might be present. Something like anchors.add('h1, h2, h3, h4, h5, h6'); in site.js?

i need to convert the code section to twig.js

i plan to change my project to export docs to json so that i can drop the json in my github site and render a template with twig.js

using this default theme, but now i am stuck at the file section.hbs

i can't understand how handlebars work, i was hoping you would clear it up for me:

<section class='py2 clearfix'>
  <h2 id='{{permalink}}' class='mt0'>
    {{name}}<span class='gray'>{{format_params}}</span>
  </h2>
  {{#if augments}}
    <p>
      Extends
      {{#augments}}
        {{autolink name}}
      {{/augments}}
    </p>
  {{/if}}
  {{#if context.github}}
    <p><a href='{{context.github}}'><code>{{context.path}}</code></a></p>
  {{/if}}
  {{#if version }}<div>Version: {{version}}</div>{{/if}}
  {{#if license }}<div>License: {{license}}</div>{{/if}}
  {{#if author }}<div>Author: {{author}}</div>{{/if}}
  {{#if copyright }}<div>Copyright: {{copyright}}</div>{{/if}}
  {{#if since }}<div>Since: {{since}}</div>{{/if}}
  {{md description}}
  {{#if params}}
    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
      {{#params}}
        <li>{{format_type type}} <strong>{{name}}</strong>
          {{#default}}
            (default <code>{{.}}</code>)
          {{/default}}
          :
          <div class='force-inline'>
            {{md description}}
          </div>
          {{#if properties}}
            <ul>
              {{#properties}}
                <li>{{format_type type}} {{name}}
                  {{#default}}
                    (default <code>{{.}}</code>)
                  {{/default}}
                  {{md description}}</li>
              {{/properties}}
            </ul>
          {{/if}}
        </li>
      {{/params}}
    </ul>
  {{/if}}
  {{#if properties}}
    <h4>Properties</h4>
    <ul class='suppress-p-margin'>
      {{#properties}}
        <li>{{format_type type}} <strong>{{name}}</strong>
            {{#default}}
              (default <code>{{.}}</code>)
            {{/default}}
            {{#description}}
              :
              <div class='force-inline'>
                {{md .}}
              </div>
            {{/description}}
            </li>
        {{#if properties}}
          <ul>
            {{#properties}}
              <li><code>{{name}}</code> {{format_type type}}
                {{#default}}
                  (default <code>{{.}}</code>)
                {{/default}}
                {{md description}}</li>
            {{/properties}}
          </ul>
        {{/if}}
      {{/properties}}
    </li>
  {{/if}}
  {{#if returns}}
    {{#returns}}
      <h4>Returns</h4>
      <code>{{format_type type}}</code>
      {{#if description}}:{{/if}}
      <div class='force-inline'>
        {{md description}}
      </div>
    {{/returns}}
  {{/if}}
  {{#if throws}}
    <h4>Throws</h4>
    <ul>
      {{#throws}}
        <li>{{format_type type}}: <div class='force-inline'>{{md description}}</div></li>
      {{/throws}}
    </ul>
  {{/if}}
  {{#if examples}}
    <h4>Examples</h4>
  {{#each examples ~}}
    {{#if caption}}<p>{{md caption}}</p>{{/if}}
    <pre class='overflow-auto'>{{highlight description}}</pre>
  {{/each}}
  {{/if}}
    {{#if members.static}}
      <h4>Static members</h4>
      {{#each members.static}}
        <div class='collapsible' id='{{permalink}}'>
          <a href='#{{permalink}}'>
            <code>
              .{{name}}<span class='gray'>{{format_params}}</span>
            </code>
            <div class='force-inline'>
              {{md description}}
            </div>
          </a>
          <div class='collapser border px2 m2'>
{{> section}}
          </div>
        </div>
      {{/each}}
    {{/if}}
    {{#if members.instance}}
      <h4>Instance members</h4>
      {{#each members.instance}}
        <div class='collapsible' id='{{permalink}}'>
          <a href='#{{permalink}}'>
            <code>
              #{{name}}<span class='gray'>{{format_params}}</span>
            </code>
            <div class='force-inline'>
              {{md description}}
            </div>
          </a>
          <div class='collapser border px2'>
{{> section}}
          </div>
        </div>
      {{/each}}
    {{/if}}
    {{#if events}}
      {{#each events}}
        <div>
  {{> section}}
        </div>
      {{/each}}
    {{/if}}
</section>

can you briefly explain how this works?

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.