### Install Node.js Dependencies Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to install the necessary dependencies for the multi-page script after cloning the repository. This is typically run from the root of the cloned repository. ```bash npm install ``` -------------------------------- ### Install Bikeshed using Pip Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to install Bikeshed in an editable mode using pip, pointing to the cloned repository path. Ensure the path is enclosed in quotes if it contains spaces. ```python python -m pip install --editable /path/to/cloned/bikeshed ``` -------------------------------- ### Generate Multi-page HTML Specification Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to run the Node.js script that breaks down the single-page specification into multiple pages. This requires Node.js to be installed. ```bash node multipage.js [path of the spec] ``` -------------------------------- ### CSS Styling for HTML Elements Source: https://github.com/w3c/html/blob/master/images/robots.html This CSS code defines styles for HTML elements like body, html, div, and p. It sets margins, padding, overflow, dimensions, positioning, text alignment, and text shadow effects to create a specific visual layout and presentation. ```css body, html { margin: 0; padding: 0; overflow: hidden; } div { width: 600px; height: 400px; position: relative; } p { position: absolute; top: 0; margin: 0.25em; font: small-caps 900 2em sans-serif; text-shadow: white 0 0 4px; } span { display: block; } .left { color: red; left: 0; text-align: left; } .right { color: blue; right: 0; text-align: right; } .middle { color: white; top: auto; bottom: 0; left: 0; right: 0; text-align: center; text-shadow: black 0 0 4px; } .middle span { display: inline-block; margin: 0 1em; font-size: 0.75em; text-transform: uppercase; } ``` -------------------------------- ### Closing Pull Request Comment Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Example of a comment to be added to a pull request in the web interface to indicate it has been merged, along with the commit hash. ```APIDOC Comment: "Merged as `hash`." Action: Click "Close pull request" button. ``` -------------------------------- ### Build HTML Specification with Bikeshed Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to build the single-page version of the HTML specification using Bikeshed. This command generates the primary output file for the specification. ```bash bikeshed spec ``` -------------------------------- ### Configure Windows PATH for Python Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to add Python 2.7.x and its scripts directory to the system's PATH environment variable on Windows. This is crucial for using Python commands from any directory. ```shell setx /m PATH "%PATH%;C:\Python27;C:\Python27\Scripts" ``` -------------------------------- ### Update Bikeshed Spec Data Source: https://github.com/w3c/html/blob/master/TEAM.md Run the 'bikeshed update' command locally to fetch the latest spec-data, then copy these files to the repository's '.spec-data' folder. ```bash bikeshed update ``` -------------------------------- ### Process Pull Request Source: https://github.com/w3c/html/blob/master/TEAM.md Execute the 'pr' command with a pull request ID to fetch and prepare it for merging. ```bash pr ``` -------------------------------- ### Update Bikeshed Specification Source: https://github.com/w3c/html/blob/master/docs/build-documentation.md Command to update the Bikeshed tool locally. This is a prerequisite for building the HTML specification and should be run before generating the spec. ```bash bikeshed update ``` -------------------------------- ### Bash: Fetch and Checkout PR Locally Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Fetches a GitHub pull request into a local branch, rebases it onto the master branch, and performs a fast-forward merge into master. This function simplifies integrating PRs for local review and testing. ```bash pr () { git fetch origin refs/pull/$1/head:refs/remotes/origin/pr/$1 --force git checkout -b pr/$1 origin/pr/$1 git rebase master git checkout master git merge pr/$1 --ff-only } ``` -------------------------------- ### Checkout Master Branch Source: https://github.com/w3c/html/blob/master/TEAM.md Switch the current branch to 'master' before processing a pull request. ```bash git checkout master ``` -------------------------------- ### Markdown vs HTML List Syntax Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Illustrates the preferred markdown syntax for defining lists and comparing it with its HTML equivalent. It emphasizes using bikeshed definition list syntax where applicable for clarity and conciseness. ```Markdown * Use [bikeshed definition list syntax](https://tabatkins.github.io/bikeshed/#markdown) where possible. E.g., prefer: ``` : define term :: term's definition ``` vs. ```html
define term
term's definition
``` (unless the `
` needs a class attribute for styling i.e., `
`) ```markdown * unordered list item ``` vs. ```html
  • unordered list item
``` ```markdown 1. ordered list item ``` vs. ```html
  1. ordered list item
``` ``` -------------------------------- ### Bikeshed Update Command Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Command to update cached Bikeshed spec-data. This ensures the build process uses the latest data by running the command locally and copying the updated files. ```Bash bikeshed update ``` -------------------------------- ### Merging Pull Requests from Forks (Bash) Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Steps for merging pull requests originating from forks into the master branch. This involves checking out the master branch, applying the pull request, squashing commits, amending the commit message if necessary, and pushing the changes. ```Bash git checkout master pr git rebase -i origin/master # Use 'squash' for commits to be combined # Use 'reword' to update commit messages git push ``` -------------------------------- ### Interactive Rebase for Squashing/Rewording Source: https://github.com/w3c/html/blob/master/TEAM.md Use interactive rebase to squash or reword commits before merging. This allows for cleaning up commit history. ```bash git rebase -i origin/master ``` -------------------------------- ### Editorial Formatting Conventions Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Details the recommended formatting for contributions to maintain readability and consistency. This includes line wrapping and tab indentation rules. ```markdown Line wrap at column `100` to keep lines easily readable ``` ```markdown Replace tab characters by `2 spaces` (use `2` as the tab stop interval) ``` -------------------------------- ### Bash: Fetch and Merge PR Locally Source: https://github.com/w3c/html/blob/master/TEAM.md This function fetches a specified GitHub pull request into a local branch. It then rebases the PR's commits onto the master branch and performs a fast-forward only merge into master. This is useful for integrating PRs without merge conflicts. ```bash pr () { git fetch origin refs/pull/$1/head:refs/remotes/origin/pr/$1 --force git checkout -b pr/$1 origin/pr/$1 git rebase master git checkout master git merge pr/$1 --ff-only } ``` -------------------------------- ### Markdown vs HTML Paragraphs Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Shows the markdown convention for separating paragraphs using a newline separator, and its equivalent HTML representation with distinct `

` tags. ```Markdown ```markdown newline separator between paragraphs ``` vs. ```html

newline separator

between paragraphs

``` ``` -------------------------------- ### HTML Specification Include Files Source: https://github.com/w3c/html/blob/master/SOURCES.html References to various include files used in the construction of the HTML specification. These files represent distinct sections or components of the standard, covering topics from acknowledgements and attributes to semantics, syntax, and web application APIs. ```text [acknowledgements.include](sections/acknowledgements.include) [attributes.include](sections/attributes.include) [browsers.include](sections/browsers.include) [changes.include](sections/changes.include) [dom.include](sections/dom.include) [editing.include](sections/editing.include) [element-content-categories.include](sections/element-content-categories.include) [element-interfaces.include](sections/element-interfaces.include) [elements.include](sections/elements.include) [events.include](sections/events.include) [iana.include](sections/iana.include) [infrastructure.include](sections/infrastructure.include) [introduction.include](sections/introduction.include) [obsolete.include](sections/obsolete.include) [rendering.include](sections/rendering.include) [semantics.include](sections/semantics.include) [semantics-common-idioms.include](sections/semantics-common-idioms.include) [semantics-document-metadata.include](sections/semantics-document-metadata.include) [semantics-edits.include](sections/semantics-edits.include) [semantics-embedded-content.include](sections/semantics-embedded-content.include) [semantics-forms.include](sections/semantics-forms.include) [semantics-grouping-content.include](sections/semantics-grouping-content.include) [semantics-interactive-elements.include](sections/semantics-interactive-elements.include) [semantics-links.include](sections/semantics-links.include) [semantics-root.include](sections/semantics-root.include) [semantics-scriptings.include](sections/semantics-scriptings.include) [semantics-sections.include](sections/semantics-sections.include) [semantics-tabular-data.include](sections/semantics-tabular-data.include) [semantics-textlevel.include](sections/semantics-textlevel.include) [syntax.include](sections/syntax.include) [webappapis.include](sections/webappapis.include) [xhtml.include](sections/xhtml.include) [cldr.include](includes/cldr.include) [entities.include](includes/entities.include) ``` -------------------------------- ### HTML Specification Linking Conventions Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Defines the standard linking conventions used within the W3C HTML specification for referencing various types of definitions and references. This includes linking to terms, elements, attributes, WebIDL, and normative/informative references. ```APIDOC Linking Conventions: - For definitions of standard terms, use `term known to bikeshed` - For definitions of elements use `<{img}>` - For definitions of attributes use `<{img/alt}>` - For WebIDL terms use `{{HTMLImageElement/alt}}` - For Normative references use `[[!shortname]]` where `shortname` is the W3C "shortname" of the spec - For informative references use `[[shortname]]` - Avoid breaking `` (or ``) text content across line breaks. E.g., prefer: ```html here is a link that is not broken across lines making it easy to search/replace :) ``` vs. ```html here is a link that is sadly broken across lines making it much harder to search/replace ``` ``` -------------------------------- ### Bash: Rebase, Push, and Merge PR Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Updates a local branch with the latest master changes, force-pushes it to update the associated pull request, and then merges it into the master branch using a fast-forward only strategy. This function is useful for updating existing PRs. ```bash mypr () { git checkout $1 git rebase master git push origin $1 --force git checkout master git merge $1 --ff-only } ``` -------------------------------- ### Merging Pull Requests from Branches (Bash) Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md Procedure for merging pull requests from branches within the same repository. It utilizes a specific function (`mypr`) and automatically closes the pull request upon pushing, unlike merging from forks. ```Bash git checkout master mypr # Squash and reword commits as needed via git rebase -i origin/master git push ``` -------------------------------- ### Protected Content Markers Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Explains the convention for identifying and protecting specific parts of the HTML specification content. Protected content is marked using HTML comments to prevent accidental overwrites and requires filing an issue for changes. ```APIDOC Protected Content: Parts of the HTML specification are protected to prevent them being overwritten. Protected content is identified using comments, as follows: ` protected text `. Please do not change these parts of the specification without [filing an issue](https://github.com/w3c/html/issues). ``` -------------------------------- ### Bash: Rebase, Push, and Merge PR Source: https://github.com/w3c/html/blob/master/TEAM.md This function rebases a local branch onto the master branch, force-pushes it to update the corresponding remote pull request, and then merges the updated branch into master using a fast-forward only strategy. It's designed to keep PRs up-to-date and cleanly merged. ```bash mypr () { git checkout $1 git rebase master git push origin $1 --force git checkout master git merge $1 --ff-only } ``` -------------------------------- ### Push Changes Source: https://github.com/w3c/html/blob/master/TEAM.md Push the local commits to the remote repository. This action may automatically close pull requests for internal branches. ```bash git push ``` -------------------------------- ### GitHub User Identification Format Source: https://github.com/w3c/html/blob/master/docs/contributing-documentation.md Specifies the format for marking contributors in pull request comments. Use '+' for adding and '-' for removing a GitHub username. ```markdown +@github_username ``` ```markdown -@github_username ``` -------------------------------- ### CSS Styling for Editor Source: https://github.com/w3c/html/blob/master/SOURCES.html Defines a CSS rule to set the background color for elements with the class 'editor'. This styling is likely applied to specific parts of the documentation or development interface. ```css .editor { background-color: skyblue; } ``` -------------------------------- ### Amend Last Commit Message Source: https://github.com/w3c/html/blob/master/TEAM.md Amend the most recent commit to update its message, often to add bug references. ```bash git commit --amend ``` -------------------------------- ### Amending Last Commit Message (Bash) Source: https://github.com/w3c/html/blob/master/docs/editing-documentation.md A method to modify the most recent commit's message. This is useful for adding bug references or correcting typos in the commit message before pushing. ```Bash git commit --amend ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.