Add static course website and GitHub Pages deployment workflow#13
Add static course website and GitHub Pages deployment workflow#13jamesmontemagno wants to merge 8 commits intogithub:mainfrom
Conversation
Co-authored-by: jamesmontemagno <1676321+jamesmontemagno@users.noreply.github.com>
Add static GitHub Pages course website
There was a problem hiding this comment.
Pull request overview
Adds a static documentation/course website under docs/ and automates publishing it to GitHub Pages, with a README badge linking to the hosted site.
Changes:
- Adds static site pages (
docs/index.html,docs/step.html) plus.nojekyllfor GitHub Pages. - Introduces a GitHub Actions workflow to deploy
docs/to GitHub Pages on pushes tomain. - Updates
README.mdto include a “View Course Website” badge/link.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
docs/index.html |
Adds the static course landing page. |
docs/step.html |
Adds the chapter reader UI that fetches and renders chapter README content. |
docs/.nojekyll |
Disables Jekyll processing for the Pages artifact. |
README.md |
Adds a website badge/link for the course site. |
.github/workflows/deploy-pages.yml |
Adds Pages deployment workflow for the docs/ folder. |
Comments suppressed due to low confidence (1)
docs/step.html:819
- The footer navigation buttons also omit an explicit
type. For non-submit buttons, settype="button"to avoid accidental form submission behavior if the layout changes later.
<button class="nav-footer-btn disabled" id="prevFooter">← Previous</button>
<span class="nav-footer-center" id="chapterIndicator"></span>
<button class="nav-footer-btn" id="nextFooter">Next →</button>
</nav>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| function renderMarkdown(raw, chapterId) { | ||
| const processed = fixImagePaths(raw, chapterId); | ||
|
|
||
| marked.setOptions({ | ||
| gfm: true, | ||
| breaks: false, | ||
| }); | ||
|
|
||
| return marked.parse(processed); | ||
| } |
There was a problem hiding this comment.
marked.parse() is used to render remote Markdown into innerHTML without any sanitization. Since Marked does not sanitize HTML, any raw HTML (including potentially <script> tags) in the fetched README content would execute on the GitHub Pages origin. Consider sanitizing the generated HTML (e.g., via DOMPurify) or configuring Marked to escape/strip raw HTML before assigning to innerHTML.
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> | ||
| <script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script> |
There was a problem hiding this comment.
The Marked dependency is loaded from a public CDN without Subresource Integrity (SRI). This creates a supply-chain risk for the GitHub Pages site. Prefer pinning with an integrity attribute (and crossorigin) or vendoring the script into the repo so the workflow deploys a known-good artifact.
| <script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js" | |
| integrity="REPLACE_WITH_ACTUAL_SHA384_HASH_FOR_marked.min.js" | |
| crossorigin="anonymous"></script> |
| [](https://docs.github.com/en/copilot/how-tos/copilot-cli)  | ||
| [](https://aka.ms/foundry/discord) | ||
| [](https://aka.ms/foundry/discord)  | ||
| [](https://jamesmontemagno.github.io/copilot-cli-for-beginners/) |
There was a problem hiding this comment.
The new badge links to https://jamesmontemagno.github.io/copilot-cli-for-beginners/, but this repository’s canonical owner/org appears to be github (e.g., Codespaces and repo links use github/copilot-cli-for-beginners). If GitHub Pages is deployed from this repo, the default URL will be https://github.github.io/copilot-cli-for-beginners/. Please update the README link (or document why a different Pages host is correct) to avoid sending users to the wrong site.
| <button class="nav-btn" id="prevBtn" disabled>← Prev</button> | ||
| <button class="nav-btn" id="nextBtn">Next →</button> | ||
| </nav> |
There was a problem hiding this comment.
These navigation controls are <button> elements without an explicit type. In HTML the default is type="submit", which can cause unintended form submissions if this markup is ever placed inside a <form>. Set type="button" for non-submit buttons.
This issue also appears on line 816 of the same file.
This pull request introduces a new GitHub Actions workflow for deploying documentation to GitHub Pages and updates the
README.mdto include a link to the course website. These changes improve the project's documentation accessibility and deployment automation.Running sample: https://jamesmontemagno.github.io/copilot-cli-for-beginners/