Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ md.renderer.rules.table_column_open = (tokens, idx, options, env, self) => {
};

module.exports = (eleventyConfig) => {
eleventyConfig.setUseGitIgnore(false);
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
init({ Prism }) {
Expand All @@ -105,6 +106,7 @@ module.exports = (eleventyConfig) => {
});

eleventyConfig.addFilter('markdown', (string) => {
if (!string) return '';
return md.renderInline(string);
});

Expand Down
4 changes: 4 additions & 0 deletions .eleventyignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
**/_*.md
!src/docs/**
src/docs/README*.md
src/docs/viewer/**
src/docs/**/*.html
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
node-version-file: '.nvmrc'
- run: npm install
- name: Sync V8 docs
run: npm run sync-docs
- run: npm run lint
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
with:
node-version-file: '.nvmrc'
- run: npm install
- name: Sync V8 docs
run: npm run sync-docs
- run: npm run lint
- run: npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ package-lock.json
Desktop.ini
._*
Thumbs.db
.v8-tmp/
# Ignore synced docs
/src/docs/*
!/src/docs/docs.json
!/src/docs/README_V8_DEV.md
3 changes: 3 additions & 0 deletions .html-minifier.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"conservativeCollapse": false,
"decodeEntities": true,
"html5": true,
"ignoreCustomFragments": [
"<pre[\\s\\S]*?<\\/pre>"
],
"includeAutoGeneratedTags": false,
"minifyCSS": true,
"minifyJS": true,
Expand Down
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/docs/
43 changes: 42 additions & 1 deletion markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
{
"ignorePatterns": [
{
"pattern": "^https?://"
},
{
"pattern": "^mailto:"
},
{
"pattern": "^/bugs?$"
},
{
"pattern": "^\\.\\./\\.\\./src/"
},
{
"pattern": "^#"
},
{
"pattern": "torque(\\.md)?$"
},
{
"pattern": "torque-builtins(\\.md)?$"
},
{
"pattern": "csa-builtins(\\.md)?$"
},
{
"pattern": "turbofan(\\.md)?$"
},
{
"pattern": "ignition(\\.md)?$"
},
{
"pattern": "hidden-classes(\\.md)?$"
},
{
"pattern": "wasm-compilation-pipeline(\\.md)?$"
},
{
"pattern": "sandbox(\\.md)?$"
}
],
"replacementPatterns": [
{
"pattern": "^/((docs|blog|features)/[\\w-]+)(?:#.*)?$",
"pattern": "^/((docs|blog|features)/[\\w/-]+)(?:#.*)?$",
"replacement": "{{BASEURL}}/src/$1.md"
},
{
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"private": true,
"scripts": {
"lint": "markdownlint \"src/**/*.md\"",
"lint": "markdownlint \"src/**/*.md\" && npm run lint:links",
"lint:links": "markdown-link-check -q --config markdown-link-check.json src/docs/**/*.md",
"eleventy": "eleventy",
"html": "html-minifier-terser --config-file=.html-minifier.json --input-dir=dist --output-dir=dist --file-ext=html",
"css": "postcss src/_css/main.css --output dist/_css/main.css && postcss src/_css/feature-support.css --output dist/_css/feature-support.css",
Expand All @@ -13,8 +14,9 @@
"copy-js": "shx cp ./node_modules/dark-mode-toggle/dist/dark-mode-toggle.min.mjs dist/_js/dark-mode-toggle.mjs",
"img-video-dimensions": "node add-image-and-video-dimensions.js",
"clean": "shx rm -rf -- dist",
"build": "npm run clean && npm run css && npm run js && npm run json && npm run copy-img && npm run copy-js && npm run eleventy && npm run sw && npm run xml && npm run html",
"watch": "npm run build && npx eleventy --watch",
"sync-docs": "node sync-docs.mjs",
"build": "npm run clean && npm run sync-docs && npm run css && npm run js && npm run json && npm run copy-img && npm run copy-js && npm run eleventy && npm run sw && npm run xml && npm run html",
"watch": "npm run sync-docs && npm run build && npx eleventy --watch",
"serve": "npm start",
"dev": "npm start",
"debug": "DEBUG=* npx eleventy",
Expand Down
3 changes: 3 additions & 0 deletions prism-languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// limitations under the License.

const installPrismLanguages = (Prism) => {
// Define an empty dummy language for 'text' so Prism does not fail
// when trying to highlight plain text blocks.
Prism.languages.text = {};

// Based on the grammar defined at the bottom of:
// https://cs.chromium.org/chromium/src/v8/src/torque/torque-parser.cc
Expand Down
8 changes: 8 additions & 0 deletions src/docs/README_V8_DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# V8 Documentation

This folder is synced automatically during deployment.
The main V8 documentation is hosted and updated directly in the [V8 repository](https://github.com/v8/v8/tree/main/docs).

Any modifications to the documentation should be done in the V8 repository. The files here in `v8.dev` are synced continuously on build via GitHub actions.

Only files that are specific to the `v8.dev` website rendering (such as `docs.json` or this README) should be committed to this directory.
45 changes: 0 additions & 45 deletions src/docs/api.md

This file was deleted.

46 changes: 0 additions & 46 deletions src/docs/become-committer.md

This file was deleted.

140 changes: 0 additions & 140 deletions src/docs/benchmarks.md

This file was deleted.

Loading
Loading