Skip to content
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

Make theme into a consumable bundle for RTD #243

Merged
merged 4 commits into from
Sep 15, 2015
Merged

Make theme into a consumable bundle for RTD #243

merged 4 commits into from
Sep 15, 2015

Conversation

agjohnson
Copy link
Collaborator

This makes the theme javascript modular, so the Read the Docs doesn't need to fork the code or assets internally. In particular, this:

  • Makes javascript a commonjs module
  • Module exports everything as public members, instead of hiding the implementation. This allows RTD to override only the necessary pieces on the instance
  • Cleans up implementation to be more composable
  • Creates a javascript source file and a bundle output. RTD will not use the bundled output, but others may still. It should work the same as the module does now.
  • Browserify creates the bundle. This is mostly for future design -- it was left in after an original test to move dependencies into the js bundle.
  • jquery, underscore, and docutil javascript is still included via the normal script tags for now.
  • Installs fonts from bower now. RTD installs directly from these bower packages as well.

See readthedocs/readthedocs.org#1645 for more info on implementation there.

@agjohnson agjohnson added this to the v1.0 milestone Sep 9, 2015
@agjohnson agjohnson self-assigned this Sep 9, 2015
@agjohnson agjohnson modified the milestones: v0.1.9, v1.0 Sep 9, 2015
@agjohnson agjohnson changed the title Refactor theme javascript to maintainable module Make theme into a consumable bundle for RTD Sep 10, 2015
@gregmuellegger
Copy link

Local test successful with a local installation of rtfd.org. JS is picked up successfully, sticky nav etc works. Code also looks good.

👍 from me.

@ericholscher
Copy link
Member

👍 -- Are we waiting on a release to do these merges with a version bump?

@agjohnson
Copy link
Collaborator Author

I'll wrap up this milestone and get a release ready. Once this is out readthedocs/readthedocs.org#1645 will need some final changes to reference the tagged release

agjohnson added a commit that referenced this pull request Sep 15, 2015
Make theme into a consumable bundle for RTD
@agjohnson agjohnson merged commit 0a1b9e8 into master Sep 15, 2015
@agjohnson agjohnson deleted the js-refactor branch September 15, 2015 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants