Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownPlugin populates route property #20

Merged
merged 7 commits into from
Mar 21, 2017
Merged

Conversation

giladgray
Copy link
Contributor

@giladgray giladgray commented Mar 21, 2017

  • introduce IHeadingTag extends ITag with route & level to make rendering headings really easy.
    • Compiler turns all @#+ tags into tag: "heading", but can't populate route yet.
    • Page operates on "page" and "heading" tags (so readable!).
  • MarkdownPlugin populates route property in pages and nav with fully qualified path to the resource: path/to/page[.heading].
  • remove obsolete heading/pageReference options as all slugification happens inside MarkdownPlugin.

Gilad Gray added 5 commits March 17, 2017 11:19
does not nest references, also depths aren't 100% accurate yet.
works really well, does not rewrite references.
to make rendering headings really easy.
Compiler turns all `@#+` tags into `tag: "heading"`, but can't populate `route` yet.
Page operates on "page" and "heading" tags (so readable!).
with fully qualified path to the resource: `path/to/page[.heading]`.
remove obsolete heading/pageReference options as all slugification
happens inside MarkdownPlugin.
@giladgray giladgray requested a review from themadcreator March 21, 2017 01:01
Copy link
Contributor

@themadcreator themadcreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Please also regen the docs

* Type guard to determine if a `contents` node is an `@tag` statement.
* Optionally tests tag name too, if `tagName` arg is provided.
*/
export function isTag(node: StringOrTag, tagName?: string): node is ITag {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handy!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep very proud of this

@blueprint-bot
Copy link

add fake _nav page in markdown test

Preview: docs

@blueprint-bot
Copy link

minor polish

Preview: docs

@giladgray giladgray merged commit b9b1faf into master Mar 21, 2017
@giladgray giladgray deleted the gg/nav-refactor branch March 21, 2017 19:32
@giladgray giladgray mentioned this pull request Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants