loveandcoding / fruitjs Goto Github PK
View Code? Open in Web Editor NEWA Node.js script for turning your markdown documentation into a fully functional site.
Home Page: http://ktsashes.github.io/FruitJS
License: MIT License
A Node.js script for turning your markdown documentation into a fully functional site.
Home Page: http://ktsashes.github.io/FruitJS
License: MIT License
Can you explain a little more about how the index is generated? I've got a relatively simple setup and I'm seeing this:
{
"name" : "Site Name",
"pages" : ["doc1.md", "doc2.md"],
"tocLevel" : 1
}
Both docs have a single H1 and multiple subheadings. Let me know if you need to see those.
Eventually I would love for the index to have categories, e.g:
If there's something I can do to day to make that happen let me know.
The license in the LICENSE seems to be MIT, but not explicitly mentioning the license by its name makes the reader spend time on trying to figure out if there are any changes or additional clauses to the license. Mentioning the license name at the top of the license file would help.
Also, documenting the license in readme file helps. For example, please see the readme file of Wintersmith. The readme file mentions the license and points to it. Mentioning the license at end of readme seems to be becoming the norm. https://github.com/jnordberg/wintersmith
Need a test engine to be able to run tests. Unfortunately the actual result will be a difficult thing to test initially, but once I get themes going, I should be able to do better testing of output.
The core document item needs better option management. Theoretically, it should just get passed in an options object and use those settings to render instead of all of this parameter crap. It would also allow global access from other areas.
Single page navigation works perfectly fine, but multipage does not. Links are getting set to "undefined.html". Need to investigate and maybe change the way I do menus again.
I have a single markdown file as input and was expecting all the headings in the generated html menu to be at the same level. However, all headings following the first one are nested at level 2 in the menu.
#one
hello
#two
world!
results in
TITLE
HELLO
WORLD
Would be great to see support for single pages as well. I am using this for generating HTML from my readme.md
and while there are simpler tools for that the output generated by FruitJS is so much cleaner with some good configuration options and extensibility if I ever grow past a single readme.md
which I eventually will.
Hi there!
It seems I'm not able to run FruitJS correctly on my computer running ubuntu 13.04.
My node is v0.10.19 and my npm 1.3.11.
When run FruitJS it throws the following error:
$ fruitjs manifest.json
module.js:340
throw err;
^
Error: Cannot find module 'RSVP'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/fruitjs/src/Utils.js:3:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I tried uninstalling and re installing FruitJS a few times, tried to install rsvp separately but nothing solved my problem.
What should I do?
Looks like a cool project and hoping to get it working, but couldn't after following the setup instructions. Instead I get env: node\r: No such file or directory
. Any idea what might be happening?
~/Desktop/test $ node -v
v0.11.6
~/Desktop/test $ ls
doc1.md doc2.md manifest.json
~/Desktop/test $ fruitjs manifest.json
env: node\r: No such file or directory
~/Desktop/test $ cat manifest.json
{
"name" : "Site Name",
"pages" : ["doc1.md", "doc2.md"],
"tocLevel" : 1
}
When a page is served over HTTPS, the webfont doesnt load properly. Switching to //
should fix it, though it means local previews in Chrome will be broken. Might want to think about alternatives to hosted font like that.
JS from the manifest file isn't getting added by the CLI. Simple Fix
It's still invalid according to the validator, though not for the reason I mentioned:
Element li not allowed as child of element nav in this context. (Suppressing further errors from this subtree.)
<li><a href="index.html#im-a-test">Im a test</a>
Contexts in which element li may be used:
Inside ol elements.
Inside ul elements.
Inside menu elements whose type attribute is in the toolbar state.
If none of the files have any header, it won't render at all. We should have a fallback in this case to render based on page filenames or something.
Hi, nice work, but I'd like to customize the output with own styles. It work fine, but can you change the order of the styles? FruitJS styles are default styles and should be the first. And custom styles should be place behind that. So I cannot overwrite default styles as simple as possible and must increase specifity.
Thanks
Ralf
The test at test/Resources/folder.gathering.manifest.json is currently failing.
The themes and templates architecture needs to be reworked and exposed. This will allow others to create new or custom themes and use them in markdown page generation. Themes should have the following features to start with:
This is the default initial manifest file that other manifest files will inherit from. Manifest files not wishing for a default value should override it.
{
"includeHead": true,
"includeNav" : true,
"includeFooter" : true,
"preRenderTemplates" : [],
"postRenderTemplates" : [],
"renderTemplate" : null,
"css" : [],
"less" : [],
"js" : [],
"images" : [],
"forceSinglePage" : false
}
More features will be added as the feature matures.
#Test page
{
"pages": ["test.md"]
}
<section id="navigation">
<h1><a href="index.html">Docs</a></h1>
<nav>
<li><a href="index.html#im-a-test">Im a test</a>
</nav>
</section>
Navigation on single page sites uses a /#id
format, which means that if you are on index.html, you end up being redirected to /
.
There is no reason that the manifest should need to include the images that are in your markdown. You should be able to refer to the images based on file location, and FruitJS should automatically pull those in.
This does however require changes to marked to allow the finding of that information for links that are inline. This will cause a full branch difference between the local copy and the npm module. Since marked is focused on speed, it is unlikely for a pull request to be taken upstream, therefore, primary development should happen in my fork and be merged in here, possibly as a git submodule.
Want to be able to add items to the menu that are not explicitly from the Markdown.
CSS, JS, and LESS files don't resolve naming conflicts. We manage injection into the page, so it should have no problem resolving the issue.
On single page renders, if headers are the same between two items, IDs can be the same, which will mess up navigation. This needs to be normalized in the local version of marked, where ID generation is happening. Likely it needs to take in a list of existing IDs and build them with that taken into account.
The code is turning into a bit of a mess, with adding everything as needed. There should be a centralized structure for asking for and receiving information between components. Easiest way will be to turn the Document object into a more centralized structure able to handle this, and farm out tasks.
A cross page link to another markdown file isn't being replaced properly if it is all being compiled into a single page.
There needs to be an easy way to link to a specific section. Linking to other page or inline content might look like this:
## Header Level 2
[Link Text][1]
[1]: ##Header Level 2
If we use hash, it will likely need to be configurable, and something that has fallbacks, or warnings.
It would be a lot easier to just include a folder instead of a list of files in the manifest sometimes. This should be easy to do, and should be part of code clean up anyway for the command line interface.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.