trulia / hologram

A markdown based documentation system for style guides.
http://trulia.github.io/hologram
Other
2.16k stars 199 forks source link

Markdown not being parsed #247

Closed AStoker closed 8 years ago

AStoker commented 8 years ago

I'm trying to set up a very basic test page using hologram. When I run hologram, it doesn't seem to parse my markdown syntax in the comment section of the scss. Running off of what the hologram init gave me.

_hologramconfig.yml:

# Hologram will run from same directory where this config file resides
# All paths should be relative to there

# The directory containing the source files to parse recursively
source: ./wwwroot/dist

# The directory that hologram will build to
destination: ./docs

# The assets needed to build the docs (includes header.html,
# footer.html, etc)
# You may put doc related assets here too: images, css, etc.
documentation_assets: ./doc_assets

# The folder that contains templates for rendering code examples.
# If you want to change the way code examples appear in the styleguide,
# modify the files in this folder
code_example_templates: ./code_example_templates

# The folder that contains custom code example renderers.
# If you want to create additional renderers that are not provided
# by Hologram (i.e. coffeescript renderer, jade renderer, etc)
# place them in this folder
# code_example_renderers: ./code_example_renderers

# Any other asset folders that need to be copied to the destination
# folder. Typically this will include the css that you are trying to
# document. May also include additional folders as needed.
dependencies:
    - ./wwwroot/dist

# Mark which category should be the index page
# Alternatively, you may have an index.md in the documentation assets
# folder instead of specifying this config.
# index: test

# To additionally output navigation for top level sections, set the value to
# 'section'. To output navigation for sub-sections,
# set the value to `all`
nav_level: all

# Hologram displays warnings when there are issues with your docs
# (e.g. if a component's parent is not found, if the _header.html and/or
#  _footer.html files aren't found)
# If you want Hologram to exit on these warnings, set the value to 'true'
# (Default value is 'false')
exit_on_warnings: false

site.scss:

$test-color: red !default;

/*doc

---
title: First
name: first
category: basics

---
    ```html_example
    <div class="test">test</div>
## Test
##Test

*/ .test { color: $test-color; }



The result:
![screen shot 2015-09-28 at 4 33 30 pm](https://cloud.githubusercontent.com/assets/2907279/10147929/cbdcfc32-65fe-11e5-986d-2eb8aa8b06d7.png)

Am I missing something? Seems like this should be working.
jdcantrell commented 8 years ago

I think your markdown is indented too far and is being viewed as code, does this work:

$test-color: red !default;

/*doc
---
title: First
name: first 
category: basics
---

```html_example
<div class="test">test</div>

Test

Test

*/ .test { color: $test-color; }

AStoker commented 8 years ago

Well, color me embarrassed. That's all it was. Much appreciated. VS did some auto-indentation, so I figured it was right... Figured Microsoft was right... First mistake ;) Thanks!