-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Documentation spike #20
Conversation
I believe this is due to using relative paths for the assets, I was actually pondering hosting the documentation in a separate repo and use github pages for that again, the benefit would be that it'd be self contained and could use any static generation it liked. |
The produced output (including assets) work fine as static HTML when served normally. I see two reasons for the problems:
Interesting idea. I'd prefer not to go that direction for a couple reasons:
I'm guessing we might have to write a middleman plugin or extension to get this to work right with middleman? Or maybe the files just need to be saved as If doing this in the same repo with middleman proves too difficult I'm up for trying your separate repo thing but I'd prefer not to go there yet. |
The |
d25e33e
to
c600aa3
Compare
The opt-out thing appears to work. There's still a couple minor problems:
|
To fix this we need to add our own copies of the assets and rewrite the path to be absolute, we could possibly then renable directory indexes to fix the second problem |
I don't quite follow. Want to take spike something out to demonstrate what you mean? |
So I was going to take a look at this, but I cant replicate your lack of styles, |
You're right, |
@JonRowe -- are you planning to look into this some more (bearing in mind the problem is with |
Yes, I'm looking at the yard template customising system. We should be able to override the generation of the assets to prevent this issue. |
Sounds promising. Long term, I'd love it if our docs included the chrome of the rest of the site so that it "fits in" with the look and feel with the rest of the site. Not necessary for this iteration, but while you're playing around with the yard templating system, maybe you can keep your eyes out for a way of using YARD's system for that purpose? |
Yeah that's the aim :) |
99c5b58
to
5430b86
Compare
I have this working now, generating docs with assets hosted in the main styles directory. |
You have to run I also have the template bits to edit the header, but I've not got the css right yet |
Thanks, @JonRowe. This seems to have broken the Class List/Method List/File List drop downs: Here's what it looks like at At Compare that to what we had before (when at |
Looks like they're using relative urls too, I'll look into it. |
5f91731
to
5b73343
Compare
Ok, so this turns out to be an issue with |
5b73343
to
4163f0a
Compare
(I've currently deployed this branch so I could check it, it'll be overwritten if someone deploys source) |
@JonRowe :D On Wed, Dec 17, 2014 at 10:43 AM, Jon Rowe [email protected]
|
This is the command used to generate docs now BTW: bundle exec yard --plugin rspec-docs-template --output-dir ../rspec-website/source/documentation/3.2/rspec-core/ (edit: obviously the ../rspec-website path should be to your copy of the website) Stills needs the website added as a gem to load the file, but I think that's ok, and we can use |
Shout out to @mootpointer for help with that ;) |
Cool, glad to hear it's not a real issue, although I'm a bit confused about why Anyhow, as far as getting this ready to merge and release, here's what I'm thinking is left...
And then as you said, we can later automate this some more. |
ebe7556
to
b792065
Compare
It's a sinatra thing, we could work out how to force redirects for it but TBH I don't think it's worth it, I've made the links add a All the docs are now up so merging and we can refine the links further if you want. |
Why no 3.0 or 3.1 docs? |
Oh because I missed those in your comment |
I'll add them later |
(incoming) |
See #34 |
I've started trying to get docs added to the site. While we don't need docs before launching the new site, I'd kinda like docs on the site before we make a big announcement about it or at least before 3.2 is released.
To generate these docs, here's what I ran from an rspec-core checkout:
(Note that rspec.github.io is in a sibling directory here).
This generated all the necessary files, but I'm seeing some issues.
First, if I go to http://localhost:4567/documentation/3.2/rspec-core, it's lacking all css/js assets:
...but if I go to http://localhost:4567/documentation/3.2/rspec-core/index.html, it does have the css/js assets:
I don't understand why the
/index.html
is needed. (Obviously, I don't understand middleman well yet...)On that apparently working page, I can't actually navigate to any of the docs -- it can't find the index files:
The result is the same for "Method List" and "File List".
Looking at the build directory, I notice I'm not seeing any of these files being copied there. I suspect that's the culprit.
@JonRowe, do you have any ideas how to get this to work?