-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Feedback/Discussion] CoFH World Docs - Examples #84
Comments
Adding a global examples page as an overview of the mod along with the more specific examples on other pages is a good idea, I like it. I would refrain from using tabs, or at least make the screenshots visible by default. Seeing pictures is always nice when browsing through a page. Also, instead of scrolling down and clicking tabs, the reader only has to scroll down. Here's my idea:
This way, everything except the code itself is always visible, making the examples easier to browse through. I like the idea of only including CSS and JS files where needed. However, that should probably be in a separate issue. |
Good to hear, I'll keep it like that then!
True, the screenshots should probably be visible by default but the code definitely should be hidden in my opinion otherwise the page is going to be very very vertical, even with code examples limited to only displaying 10 lines.
Okay, for now I'll not worry about the extra global CSS/JS and we can look at that issue later. Thanks for the feedback. |
I like this much better. A couple notes:
|
Would you be okay with e.g. a Github Gist embed for showing the code? Otherwise I'm not really sure how to implement it. EDIT: The main issue with that being I don't think it's possible for me to give you guys permission to edit my gists. I think I have an idea how I'd implement it without using embedded gists but it's going to be a lot of messing around/much more difficult than embeds. |
I'm pretty happy with my progress so far. I've got it to the point where the individual feature/distribution types use the same templates even. So, for example, in {% include examples.html group="lake" primary=false %} The only thing that changes for each is the Even the main/master examples page uses this same include so it's all very nice and centralised. The only difference on the main examples page is that I am brand new to Jekyll and Liquid but I'm pretty happy with my implementation. Also, since I've updated all the pages, now we get an automatic nice little thing: HINT: It's the little notice under examples. And it naturally goes away if you add examples for that thing automatically, of course. At this point I'm awaiting feedback on:
Also there are a few issues:
In any case, all the code has been pushed to my branch if you did want to take a look at it. |
As I said, there is no difference in the layout/template for the feature/distribution type pages but just for the sake of completeness: (Yes, it says And just to prevent you from having to dive through my code/for the sake of even more completeness, this is basically what an example definition file looks like: ---
link:
docs: /docs/cofh-world/world-generator-configuration/feature-types/boulder/
code:
embed: $LINK_TO_GITHUB_GIST
download: $LINK_TO_GITHUB_GIST
type: feature
group: boulder
title: Boulder Example
primary: false
images:
-
href: foo.png
title: I am the first example.
-
href: bar.png
title: I am the second example.
---
This is an example of spawning boulders. |
I was a bit unsure about the Gist embeds, but they do look quite nice. I would suggest putting the gists in the CoFH group, but it looks like that's not possible. Maybe we could make a shared account for them, or something. The easiest alternative to Gists would be to just add the code in
|
|
I decided to make it so you can choose whether to use a Github Gist or whether to include the code in the example itself, on a per example basis. I also experimented some more with the layout. I am using Rouge for syntax highlighting, I believe it's the default anyway with Jekyll. Below you can see both (gist and non-gist) in one image. At this point I am going to stop messing with the layout so much, it's just a single file that needs to change and it can be done later, at any time, by anyone. I am going to move on to actually compiling all of the examples now: writing the JSON files, writing the descriptions and taking the screenshots. 😄 |
Just chiming in to say y'all are great, thanks. |
Apparently contributions are welcome according to KingLemming on Discord, so I started working on a little something.
I just wanted to open an issue early on so that discussion can take place and feedback can be gathered and such.
If there's anything about the layout/design you'd change then please let me know.
Also if you disagree with the decision to have one example per page on an Examples page and several on each Feature and Distribution Type page then also speak up.
Legend
⏳ In-progress.
Issues
docs.html
layout. Which is a fair bit better. Suggestions welcome.Todo List
Code
https://github.com/sustained/cofh.github.io/tree/cofh-world-docs-improvements
The text was updated successfully, but these errors were encountered: