Replies: 5 comments
-
On jeykll I created, at compile time, a |
Beta Was this translation helpful? Give feedback.
-
Hmmm. That might could, or something similar. The issue arises again if the documentation becomes too large, this file could too become a bit large maybe. I suppose the file would need to include the link to the appropriate page and any keywords associated with that page. There is a way with Middleman to have a global data file that can be accessed by all templates being generated, so that might could work. I'll delve into the current search and look into other search algorithms to see what I can find. Avoiding backend work is fairly important to me, I think |
Beta Was this translation helpful? Give feedback.
-
Some thoughts:
|
Beta Was this translation helpful? Give feedback.
-
So I have been working on a project heavily based on slate, but decoupling slate from middleman so that it could be it's own standalone ruby app. The only issues that I run into with it is that search only uses the current page (just like current slate implementation) and an issue where the toc headers do not style correctly when using multiple pages (that I should be able to solve). In decoupling I think I might have managed to make set up even easier with a simple 5 steps:
This is not backwards compatible without some work on the end users part, but is doable. While this is a silly approach if you have only one page documentation, it works well for multipaged documentation, and is a great starting point for fixing search for multiple pages issue, maybe. This might also make a good playground to look at the version switcher. Further, I think that perhaps Stripe's docs with a single page is more likely to be implemented in such a way. Using a full rails app, you could ajaxily load new pages as you scroll. Admittedly, I'm not sure how well you could manage using just javascript. If you wanna check the repro out, it is at https://github.com/E1337Kat/slate_server (I need to write the readme so that people know how to use it... This has been personal work so far, but I plan to implement it for my job so our docs can finally look nice.) |
Beta Was this translation helpful? Give feedback.
-
I finally figured out how to make the ToC work with multiple pages when using the slate server build. I believe I should be able to make it work for the middleman built docs as well, but I have not tested this yet. I think I could use similar design principles for the search as well. The basic solution is that when building the ToC, you use the new way of building it from the data files. When the builder gets to the current page, it hands over to the old way of building the ToC that lord created. This way the current page can utilize the beautiful ToC css, and you still get to show all the other resources. The only bug seems to be when someone reloads the page when not at the top of the page and having not clicked on a request to use. I am gonna read up on some dynamic loading stuff in rails and see if I can figure it out. with the middleman process, I would think the dynamic loading would need to be JS based.... which does not sound so fun. |
Beta Was this translation helpful? Give feedback.
-
Sometimes our APIs can become quite... large. Slate is beautiful, but when large enough the page starts having issues loading or keeping up with scrolling. The seemingly simple solution to this is to allow the documentation to be broken off between multiple pages and even nesting folders. Some work has already been done towards this effort, but no major changes have come out of it.
I know that issue #345 exists, but I think a new ticket to properly outline how this feature should look and work would be a good idea. In #994 I gave a go at trying to get this feature to work. I should have made this ticket first to give it a go here. Since I put in that PR, I actually had made some further changes which touched upon some of @lord's comments in #994. The branch with these changes are here.
Anyways, this is a discussion to decide how to go about solving 4 key issues:
I look forward to any and all thoughts regarding this. 🙂
Beta Was this translation helpful? Give feedback.
All reactions