w3c / wai-people-use-web

25 stars 60 forks source link

add "draft" for PR 113 #265

Closed shawna-slh closed 10 months ago

shawna-slh commented 1 year ago

Hey Kevin &/or Shadi. Please add draft note, as I want to point to this as work-in-progress. Two options:

  1. Banner at the top, e.g., https://deploy-preview-721--wai-tutorials2.netlify.app/tutorials/ Pro: I think would be one change and take care of all pages. However, I didn't figure out how to do this.

Hint: https://github.com/w3c/wai-website-theme/blob/master/_includes/header.html has

  <p class="inner" style="margin: 0;padding: 1em 0;">{% if site.warning_icon %}{% include_cached icon.html name="info" %} {% endif %}{% if site.warning_message %}{{site.warning_message}}{% else %}This is an unpublished draft preview that might include content that is not yet approved. The published website is at <a href="https://www.w3.org/WAI/">w3.org/WAI/</a>.{% endif %}
  </p>
  1. With h1 on each page, e.g., https://deploy-preview-113--wai-people-use-web.netlify.app/people-use-web/ To do that, add to the frontmatter (maybe right after the title so it's easy to find to delete later):
doc-note-type: draft
doc-note-message: <p>This is an in-progress draft. The previously published version is at <a href="https://www.w3.org/WAI/people-use-web/">www.w3.org/WAI/people-use-web/</a>.</p>

Thanks!

JayneSchurick commented 10 months ago

???

remibetin commented 10 months ago

@shawna-slh

Option 1 (probably the best because it applies to the entire preview) is applied when there is no published: true line in _config_staging.yml file.

This also allows editor notes to show up in the preview (see https://wai-website-theme.netlify.app/components/editor-notes/), but not in the live site.

If you still wish to use this option, I've opened a PR for this: https://github.com/w3c/wai-people-use-web/pull/305

remibetin commented 10 months ago

305 merged