-
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
Cofh World - Add Examples #86
base: master
Are you sure you want to change the base?
Conversation
See this issue: jekyll/jekyll#2938 (comment)
TODO: Only include JS on pages that need it?
Required by lightbox.
Perhaps there is a better way to handle this but as it stands I don't really understand why that CSS is there/why it is targetting things in the way that it is.
We certainly don't want this file to be a part of the boulder group.
Note that this isn't what I would call complete, I am just sending in the PR as it is approaching completion. I'll keep working on it in the coming days. Please let me know if there's anything wrong or that needs to change and I'll get it done. I'm brand new to Jekyll/Liquid and it's possible I've done something stupid. It's also fairly likely that my code is ugly or dumb. As I said, just let me know; I'll fix it. |
I plan to try to get this finished soon but I'd appreciate a bit of input from the web guy on the work so far because if there are major issues with anything I've done here then I need to know about them so that I can make the necessary changes. |
I tooked around and I quite like how it looks so far. Nice job! When merging I will probably do some finishing touches myself, but nothing really big. I did notice most of the pages that have examples also have the 'no examples' message at the bottom. |
Excellent, I'll try to get this finished soon then. Huh okay... odd, I'll have to look into that. |
Overview
Main Examples Page
The way I have things set up there is a concept of "primary" examples. Every single feature type, distribution type and common format has ONE primary example.
Then there is a master "examples" page which lists all of these primary examples.
The intention is that this page provides a great overview of the mod, complete with example JSON files, images and all. Furthermore, the intent is that these primary examples will be kept nice and simple, so as to not overwhelm people early on.
The link to this new examples page is displayed in the footer.
The existence of this new examples page is also alluded to on the main CoFH World page.
Docs Pages
On the actual docs pages for feature types, distribution types and common formats the primary example is always the first one displayed (and is highlighted in blue).
Any further examples will be displayed below.
How it works
Examples are defined by markdown files, primarily via YAML front matter.
An example of a minimal example definition file.
The example files are organised into directories but this is not necessary, it is the
type
and thegroup
that matters.Unfortunately Jekyll/Liquid doesn't support any concept of "sub-collections" so I had to use the front matter instead.
Instead of inlining the code like in the above example, it's also possible to use Github Gist. Simply additionally define
link.code.embed
andlink.code.download
.Progress
Primary Examples
Screenshots
How an individual example looks.
One of the docs pages showing how it looks when there are multiple examples.
The examples page as it currently stands.