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

Configure docs.helm.sh to pull content from kubernetes/helm #47

Merged
merged 24 commits into from
Jun 28, 2017

Conversation

flynnduism
Copy link
Member

@flynnduism flynnduism commented Jun 13, 2017

This modifies the gulp build process, to import and index the latest docs content from github.com/kubernetes/helm, and use it to generate the docs.helm.sh website.

Why?

  • no need to insert TOML into the source, i.e. Helm devs don't have to change how they work on docs
  • avoids breaking test on kubernetes/helm caused by changing the docs format
  • avoids having Hugo elements in the docs at kubernetes/helm being overwritten whenever make docs is ran during development
  • the build script will fetching the latest docs, no manual syncing

--

How?

  • Updates gulp task with gulp-git

  • Replaces local docs content with the latest copy from kubernetes/helm

  • Indexes the site content locally, instead of requiring the source to use a Hugo-friendly format
    (i.e. stop depending on the inclusion of TOML metadata)

    this is handled locally by:

    • (i) using gulp to create page categories, and
    • (ii) manually building the site navigation in the config.yml

Removes the local copy of the /docs folder, and instead uses the latest
/docs folder from https://github.com/kubernetes/helm:master to generate
the docs.helm.sh website, to ensure the latest contents are published.

The gulp build process will fetch github.com/kubernetes/helm and clone
the contents into /source, then Hugo will build the site from the
markdown content found within /source/docs.
@flynnduism
Copy link
Member Author

flynnduism commented Jun 13, 2017

Some issues to resolve before review:

  • fix the title format in the topbar
  • reorder the content in subsections
  • using_helm/using_helm path not working
  • find and replace (or redirect plugin) to update and repair internal links
  • fix image paths for developing-charts/the-chart-repository-guide

* updates the sidebar menu with urls and category groupings that
  correspond to the latest docs content from kubernetes/helm repo
* inject the name of each file as an alias (toml) to create redirects
	so that `/page.md` will reroute to `/#page`
* find and replace to fix broken urls
* find and replace to fix image paths
* use runSequence to ensure gulp tasks wait for each other to fully
  complete (where necessary) and run in order
@flynnduism
Copy link
Member Author

Various tidyups, redirects, and bugs now addressed.
Ready for some 👀 - @vdice or @slack perhaps?

@vdice
Copy link
Member

vdice commented Jun 22, 2017

@flynnduism sure thing! In addition to code review, deploying site off this branch somewhere locally and checking it out probably be the ticket?

@flynnduism
Copy link
Member Author

@vdice yeah that would be awesome!

@flynnduism
Copy link
Member Author

@vdice staging updated with working webfonts: http://docs-helm-sh.staging.deis.com/

To get them working here, Hugo's config.toml required the baseurl be set to http://docs-helm-sh.staging.deis.com/ instead of the production url.

docs/config.toml Outdated
publishdir = "app"

[params]
title = "Helm Docs"
author = "Ronan Flynn-Curran"
description = "Documentation for Helm - The Kubernetes Package Manager."

canonifyURLs = "false"
relativeURLs = "true"
canonifyURLs = "true"
Copy link
Member

Choose a reason for hiding this comment

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

curious about the change to flip this and the relativeURLs values from previous?


[[menu.main]]
name = "Home"
url = "https://docs.helm.sh"
Copy link
Member

Choose a reason for hiding this comment

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

perhaps related to comment above -- are we sure we want to hardcode the url here? (as opposed to it being relative/based on environment where deployed)

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened this as a follow-up issue (#49).
Hugo makes it a bit tricky, but it should be doable.

During development, I had changed these values whilst debugging Hugo
and forgotten to revert them back to the recommended settings.
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

lgtm, assuming latest commit deployed to staging, looks good!

@flynnduism flynnduism merged commit 4128bdf into helm:master Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants