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
Add a mkdocs json
that builds a site in json.
#128
Conversation
Looks like this needs a rebase, but I can't see why. Otherwise, LGTM but I'll wait for Tom to weigh in as this in a new feature. |
Sorry - accidental close. That was my dog! |
@ericholscher - So is this for search or for the API? |
(Or both) |
@tomchristie This was in buffer for #mkdocs when I looked at IRC this morning.
|
Is the RTD search server side based? |
Obv on it's own I'd be meh about this, but if it's a blocker to being able to get it onto RTD then it's clearly worthwhile. :) |
Needs adding into help, adding to documentation. |
I think it must be serverside, as they have cross project search like this: |
The merge conflict is because |
@edbrannin of course, thanks :) |
Yea, this is for generating search indexes on RTD -- it was just the On Fri, Aug 22, 2014 at 6:56 AM, Dougal Matthews notifications@github.com
Eric Holscher |
@@ -30,6 +30,9 @@ def main(cmd, args, options=None): | |||
elif cmd == 'build': | |||
config = load_config(options=options) | |||
build(config) | |||
elif cmd == 'json': | |||
config = load_config(options=options) | |||
build(config, dump_json=True) | |||
elif cmd == 'gh-deploy': | |||
config = load_config(options=options) | |||
build(config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'json' needs to be added to the help output in the else clause a few lines down.
Added one comment inline about help output. Could we also include the json command in the tox run by adding it to tox like https://github.com/tomchristie/mkdocs/blob/master/tox.ini#L12? It could probably be added to the same environment. This will then at least give us an integration tests for this. |
b8b8df6
to
77a29a7
Compare
Rebased and pushed up the above suggestions. Build passed, so it seems happy. |
The one gotcha is that you need to add |
Thanks! |
Be really good if we could unify this and the tipue JSON. Right now it's a bit weird that we have a user-facing command that's really intended only for RTD behind the scenes consumption - (it's not obvious to me as a user what the format is or why it's there.) |
This is mainly for Read the Docs -- but it would be neat to have mkdocs build both the JSON and HTML versions of docs, so when you hit a URL, you can just change the .html into a .json and you get the JSON representation of the files.
This doesn't have tests currently, just curious what folks think about it before I invest too much time.