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

Use Netlify redirects to host docs #268

Merged
merged 14 commits into from
Dec 14, 2022
Merged

Use Netlify redirects to host docs #268

merged 14 commits into from
Dec 14, 2022

Conversation

jerivas
Copy link
Member

@jerivas jerivas commented Oct 28, 2022

Todo:

  • release Herman
  • release Accoutrement
  • release True
  • release Blend
  • release CCS
  • release Susy

I got this idea form the Netlify forum:

  1. Each project gets a new shadow repo to host the built docs, instead of including them in the main repo or the npm package
  2. Each of these shadow repos also get a Netlify site that hosts the docs
  3. Oddleventy uses Netlify redirects to render the per-project docs in specific folders under the original oddbird.net domain.

Right now I have created and populated the herman-docs repo manually, so the documentation for Herman should still work in this deploy preview. Up next we need to configure each project repo to push the built docs to the shadow repo, then we can merge this PR.

@jerivas jerivas requested a review from jgerigmeyer October 28, 2022 22:34
@github-actions
Copy link

View diff of compiled files (may take a few minutes): https://github.com/oddbird/oddleventy-built/compare/main..project-docs-redirect

@jerivas
Copy link
Member Author

jerivas commented Oct 28, 2022

@jerivas
Copy link
Member Author

jerivas commented Oct 28, 2022

@jgerigmeyer looks like the redirect/rewrite is working. If you go to https://deploy-preview-268--oddleventy.netlify.app/herman/docs/ and inspect the source, you'll see the comment that I added here, so it's truly one site being served from another.

I'll work on automating the docs generation from Herman releases. Once we have a good setup for Herman we can replicate it on the other repos and merge this PR.

Let me know what you think of this solution.

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

@jerivas This approach looks good to me! Two thoughts:

  1. Would there be a way to get these redirects working in local development too? Right now it seems to result in a 404.
  2. For generating the docs, I think ideally we'd want them rebuilt every time there is a "latest" release created on GH.

* main:
  fix missing link
  Add GH action to check links
  First round fixing broken links.
@jerivas
Copy link
Member Author

jerivas commented Nov 1, 2022

Would there be a way to get these redirects working in local development too? Right now it seems to result in a 404.

I'll look into proxying the docs from their Netlify sites using eleventy's server. Or did you mean something local?

For generating the docs, I think ideally we'd want them rebuilt every time there is a "latest" release created on GH.

I'm experimenting with release triggers in my sandbox repo and it's working fine so far. Should have a PR ready for Herman tomorrow.

@jgerigmeyer
Copy link
Member

Would there be a way to get these redirects working in local development too? Right now it seems to result in a 404.

I'll look into proxying the docs from their Netlify sites using eleventy's server. Or did you mean something local?

Yeah, that's what I meant -- just so the links work in local development too. But that's a pretty minor point, so if it's not simple we could just replace those internal links with external links so they always work.

@jgerigmeyer
Copy link
Member

For generating the docs, I think ideally we'd want them rebuilt every time there is a "latest" release created on GH.

I'm experimenting with release triggers in my sandbox repo and it's working fine so far. Should have a PR ready for Herman tomorrow.

It looks like we maybe want the released type instead of published? https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#webhook-payload-object-42

* main:
  run checklinks action monthly
  try different link checker
  Try different package for checking external links
  More broken links
  test checklinks plugin
Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

@jerivas This looks good, but I think we wait to merge this until all the relevant repo PRs are merged first, yes?

* main:
  Automated dependency upgrades
  Automated webmentions update
@jgerigmeyer jgerigmeyer marked this pull request as ready for review November 7, 2022 22:18
* main: (98 commits)
  Re-add event links to non-card view.
  tests
  AEA slides and unordered event lists
  update talks link sr-text
  Re-add date to oss/client pages.
  Remove date from tag detail pages
  Address review, and fix page summary margins
  Apply suggestions from code review
  remove oddbird events
  Remove padding from compact-events
  do not upgrade terser for now
  Downgrade rollup-terser until bugs are fixed
  remove webmention
  Automated dependency upgrades
  Automated webmentions update
  Use "range" dateformat for talks/workshops
  test
  review
  Ed quote, and talks on bird pages
  Address review
  ...
@jgerigmeyer jgerigmeyer merged commit d91fe34 into main Dec 14, 2022
@jgerigmeyer jgerigmeyer deleted the project-docs-redirect branch December 14, 2022 21:07
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.

2 participants