-
-
Notifications
You must be signed in to change notification settings - Fork 926
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
Flems in docs (#2348) [skip ci] #2348
Conversation
The latest version is available here http://porsager.com/mithril-docs so you don't have to build to check it out ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM mod a few nits
I'm also unsure about the direction of the rings next to the logo (it has a transform 180deg) compared to the favicons? |
@porsager Found the line, and I'd say just kill the |
Just realized I never pushed the commit I had made way back then :-( Oh well.. Hopefully we can get it going again now :) Sorry. |
@isiahmeadows is there anything more to add here? |
Quick question: is http://porsager.com/mithril-docs/ up to date? Edit: fixed typo |
Sorry for the delay - been away from the computer for a while. |
I'm not sure it was up to date, but it is now ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit, and I'm good with it: could you remove all the "Live Example" headings and just leave their contents (i.e. the flems segments) as-is? It's pretty clear from context they're live examples.
Also, I thought I'd point out your embed is broken: the insertion point isn't showing on the first line. Not something to fix |
# Conflicts: # README.md # mithril.js # mithril.min.js
This all appears to be good now. I've merged latest master, and there's a preview available here: http://porsager.com/mithril-docs/index.html |
Quick question: is there an escape hatch in case it's like an incomplete snippet or something? |
My approval here is tentative. There's a bit more I need to go over before I'm ready to merge this, but it's more about whether an escape hatch is necessary now or if one can be hacked in later. |
sorry, I don't think I understand what you mean by escape hatch? |
@porsager I mean being able to tell the init script to not wrap the script up in a Flems embed on load. |
Hmm, so a quicker way than comment out the initialization part? |
@porsager I mean on a per-block basis, like if a single block is this: view: function(vnode) {
// code...
} In that case, it's entirely nonsensical to try to wrap that into Flems. But since ES doesn't offer a parser API and I'd rather avoid executing code blocks (they might be using third-party APIs) in general, an escape hatch would be nice. |
Ah now I get what you mean. Code blocks are only turned into Flemses if you use |
@porsager Oh okay. In that case, could you update the contributing document to note that about the documentation, so people know the semantic difference? |
Ok.. done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Yay! Nice @isiahmeadows .. Sorry my respond cycle on this has been so long! Glad to finally see it merged. |
No problem. My response times have been going up lately myself. 😉 |
Reviving this one cause flems is still not being leveraged in docs. |
* Initial addition of flems - fixes #526 * Fix leftover ```js code blocks * Add DOCTYPE * Fix edge & IE11 * Don't show console * Change orientation on mobile * Use mithril@next for playground link * Improve loading and structure * Fix header alignment in IE * Don't rotate logo * Fix conflicts * Allow `js` tags * Fix code block query * Fix Routing section and flems * Fix firefox * Improve flems styling * Improve copy * Fix data -> body in m.request sample * Add flems in docs usage description
Added flems instead of the current codepen samples.
Description
I've added a check for any code boxes which was generated from a
```js
markdown tag, and then convert them to Flems live sandboxes. This should be great for keeping the markdown docs pretty, and the website even better.Motivation and Context
Fixes #526
How Has This Been Tested?
Manually tested on macos & windows in IE11, edge, safari, chrome & firefox
Types of changes
Checklist:
docs/change-log.md