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

DO NOT MERGE: Split documentation in to sub-app #158

Closed
wants to merge 52 commits into from

Conversation

edwardhorsford
Copy link
Contributor

This PR moves documentation and examples outside of app and in to a new sub-app called docs. This gives us a more consistent place to put documentation, and means our upgrade path is easier - users upgrading via copying app will now be able to get up to date documentation.

This PR also introduces a new documentation 'home' - the intention being we can push this to heroku and have a single place we can point people at to get the kit and docs, etc.

You can play with it here: http://prototype-kit-documentation.herokuapp.com/

Fixes #151

Changes:

  • Move docs and examples in to sub-app /docs/
  • New docs start page which links to everything.
  • Uses github API to get the url to the zip of the latest release - easier than linking to github.
  • Renders markdown files as html - markdown will still work and link in Github though.
  • Introduces a config var to enable docs or not.
  • Introduces a env var to redirect the root to docs - this means we can deploy to govuk-prototype-kit.herokuapp.com and have the docs be the primary page.
  • Change to npm module nunjucks from express-nunjucks, as it didn't seem to correctly support sub-applications.

Things that aren't finished:

  • I couldn't fully split out the sass it needs. Ideally it would be included via grunt, but it needed an include in the app folder. Would be better if it produced it's own sass file that was an extra include for the docs templates only.
  • Most app middleware isn't applied to the new docsApp - however this doesn't seem to have any detrimental effect.
  • Routing in the sub-app might have a bug - I couldn't get redirect routing relative to the mount point to work.

NB: I'd expect this to be a major version change.

useAuth = process.env.USE_AUTH || config.useAuth;
useAuth = process.env.USE_AUTH || config.useAuth,
useDocs = (config.useDocs == "true" ) ? true : false,
promoMode = process.env.PROMO_MODE || 'false',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should get converted to lowercase like the other environment booleans

@edwardhorsford
Copy link
Contributor Author

I think I've addressed all your comments except caching of the url.

@edwardhorsford
Copy link
Contributor Author

@joelanman I've implemented caching of the url for the life of the app. This is probably fine as long as the app goes to sleep every so often. If we ever have persistently running apps, we may want to do something a bit more clever.

@edwardhorsford edwardhorsford changed the title For review: Split documentation in to sub-app Split documentation in to sub-app Mar 14, 2016
@edwardhorsford edwardhorsford changed the title Split documentation in to sub-app DO NOT MERGE: Split documentation in to sub-app Mar 30, 2016
@joelanman joelanman mentioned this pull request Jun 8, 2016
<li><a href="/docs">GOV.UK prototype kit</a></li>
</ol>
</div>
<h1 class="heading-xlarge">About</h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'About the prototype kit'?

@gemmaleigh
Copy link
Contributor

Can this be closed in favour of #244? @edwardhorsford

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.

4 participants