Skip to content
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b6fedfa
Update link checking to use latest hyperlink. Replaces #1582
Munter Jul 23, 2018
d0f9ed5
Stop appending empty fragment to urls pointing ad no fragment identifier
Munter Jul 23, 2018
b70a775
Resolve relative hrefs from README's to their github.com url instead …
Munter Jul 25, 2018
958c136
Prefer https where available and also use https in examples
Munter Jul 25, 2018
fa437ea
Make non-fragment links inside headings visible
Munter Jul 25, 2018
63ae0bd
Update webpack docs china link
Munter Jul 25, 2018
00e8fbc
Fixed invalid edit links to index pages
Munter Jul 25, 2018
a317676
skip fragment check for vimdoc that is known to fail
Munter Jul 25, 2018
12dccb7
Fix broken link to migration guide from configuration/resolve
Munter Jul 25, 2018
de51fb0
Also resolve github README relative links when they don't start with …
Munter Jul 25, 2018
42b9d84
Add missing pages: Vote, Organization, Starter kits
Munter Jul 25, 2018
adcd3bd
Remove unused code
Munter Jul 25, 2018
422e7fa
Fix link that was redirected
Munter Jul 25, 2018
f400cd2
Open all target='_blank' links with rel='noopener' for security
Munter Jul 25, 2018
1c3ee46
Skip link checking img.shields.io
Munter Jul 25, 2018
fc4e876
Change order of markdown url rewriting to avoid errors
Munter Jul 25, 2018
b363414
Use lowercase variable name for node url module. See https://github.c…
Munter Jul 25, 2018
bd227a8
Update link to file-loader github repo
Munter Jul 26, 2018
ade9cb7
Rewrite links from https://npmjs.com to https://www.npmjs.com to avoi…
Munter Jul 26, 2018
1a19c2d
Skip checking links to npmjs.com/package that causes hyperlink to get…
Munter Jul 26, 2018
071407e
Updated organization projects urls to their redirect target
Munter Jul 26, 2018
73dec22
Update tool-list to get correct links for projects
Munter Jul 26, 2018
73779f7
Updated links to their redirect target
Munter Jul 26, 2018
43967dd
Remove jscs-loader. The project is deprecated, merged with eslint and…
Munter Jul 26, 2018
a8c6872
Update link to karma-webpack project
Munter Jul 26, 2018
076dd73
Remove link to named-modules-plugin, which is now in webpack core
Munter Jul 26, 2018
2ef4cb9
Added missing mini-css-extract-plugin to fetch script
Munter Jul 26, 2018
4932f17
Skip checking links to known deleted github users
Munter Jul 26, 2018
3ddaa42
Update broken fragments to work with new markdown generator
Munter Jul 26, 2018
2438e5b
Fixed more broken links
Munter Jul 27, 2018
710188c
Merge branch 'rebuild' into rebuild-hyperlink
montogeek Jul 27, 2018
972de53
infra(site) Copy assets when building
montogeek Jul 27, 2018
ebede53
Update github location for css-loader
Munter Jul 27, 2018
9e8fab8
Remove dead github accounts from contributors listings
Munter Jul 27, 2018
42cb344
infra(site) Fix fetchPackages script when running locally
montogeek Jul 27, 2018
cabd893
Fix internal fragmtn links in optimization.md
Munter Jul 27, 2018
5321534
Skip link checking or opencollective.com/webpack. Massive html respon…
Munter Jul 27, 2018
7b20e07
Remove link to non-existing named-modules-plugin
Munter Jul 29, 2018
21c589f
Use new release of hyperlink
Munter Jul 29, 2018
ab6f6c1
feat(infra) Travis optimization (#2404)
Munter Aug 2, 2018
e48c836
Merge branch 'rebuild' into rebuild-hyperlink
montogeek Aug 2, 2018
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
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"lint:markdown": "markdownlint --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
"lint:social": "alex . -q",
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
"linkcheck": "hyperlink -r dist/index.html --canonicalroot https://webpack.js.org/ --skip support__ --skip sidecar.gitter.im --skip vimdoc.sourceforge.net --skip img.shields.io --skip npmjs.com/package/ --skip opencollective.com/webpack --todo external-redirect | tee master.tap | tap-spot",
"sitemap": "cd dist && sitemap-static --prefix=https://webpack.js.org/ > sitemap.xml",
"serve": "npm run build && sirv start ./dist --port 4000",
"deploy": "gh-pages -d dist"
Expand All @@ -47,8 +48,12 @@
}
},
"lint-staged": {
"*.{js,jsx,md}": ["npm run lint:js"],
"*.md": ["npm run lint:markdown"]
"*.{js,jsx,md}": [
"npm run lint:js"
],
"*.md": [
"npm run lint:markdown"
]
},
"devDependencies": {
"@octokit/rest": "^15.2.6",
Expand All @@ -62,7 +67,7 @@
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"copy-webpack-plugin": "^4.3.0",
"copy-webpack-plugin": "4.5.2",
"cross-env": "5.2.0",
"css-loader": "^0.28.5",
"directory-tree": "2.1.0",
Expand All @@ -81,7 +86,7 @@
"html-webpack-template": "^6.1.0",
"http-server": "^0.10.0",
"husky": "^1.0.0-rc.8",
"hyperlink": "^3.0.1",
"hyperlink": "^4.0.0",
"lint-staged": "^7.2.0",
"loader-utils": "^1.1.0",
"lodash": "^4.17.4",
Expand Down Expand Up @@ -113,7 +118,7 @@
"sitemap-static": "^0.4.2",
"static-site-generator-webpack-plugin": "^3.4.1",
"style-loader": "^0.18.2",
"tap-parser": "^6.0.1",
"tap-spot": "^1.1.1",
"through2": "^2.0.3",
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^3.10.0",
Expand All @@ -122,9 +127,9 @@
},
"dependencies": {
"@rigor789/remark-autolink-headings": "^5.1.0",
"ajv": "^5.5.2",
"docsearch.js": "^2.5.2",
"gitter-sidecar": "^1.2.3",
"ajv": "^5.5.2",
"javascriptstuff-db": "^1.12.0",
"lodash.throttle": "^4.1.1",
"prop-types": "^15.5.10",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/Link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default ({
if ( url ) to = url;

if ( to.startsWith('http') || to.startsWith('//') )
return <a href={ to } target="_blank" { ...props } />;
return <a href={ to } target="_blank" rel="noopener" { ...props } />;

else return <Link to={ to } { ...props } />;
};
4 changes: 2 additions & 2 deletions src/components/Markdown/Markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
color: inherit;
}

a {
a[aria-hidden="true"] {
margin-left: 8px;
font-size: 0.8em;
height: 1em;
Expand All @@ -35,7 +35,7 @@
transition: all 250ms;
}

&:hover a {
&:hover a[aria-hidden="true"] {
opacity: 1;
visibility: visible;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class Navigation extends React.Component {
className="navigation__languages"
items={[
{ title: 'English', url: 'https://webpack.js.org/' },
{ lang: 'zh', title: '中文', url: 'https://doc.webpack-china.org/' }
{ lang: 'zh', title: '中文', url: 'https://webpack.docschina.org/' }
]} />
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Organization/Organization.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import './Organization.scss';

const Organization = props => {
return (
<Container className="organization page__content">
<Container className="organization page__content markdown">
<h1>The Organization</h1>

<p>The list below provides a brief overview of all commonly used projects in the webpack ecosystem.</p>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Organization/Organization.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

.organization {
padding: 1.5em;

&__title > h4 {
margin-top: 0; // Overrides markdown scss
Copy link
Member

Choose a reason for hiding this comment

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

Why add markdown in the first place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems all the basic styles are now scoped under .markdownwhere they previously existed under page__content (now removed).

I'm not happy with this solution, but I'm not going to redo the CSS architecture as well when my focus is fixing broken links

Copy link
Member

Choose a reason for hiding this comment

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

Me neither, will fix :)

}
}

.organization__projects {
Expand Down
66 changes: 33 additions & 33 deletions src/components/Organization/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@
"maintainer": "Spacek33z"
},
{
"repo": "webpack/file-loader",
"repo": "webpack-contrib/file-loader",
"npm": "file-loader",
"description": "A simple loader for copying and renaming files.",
"maintainer": "sokra"
},
{
"repo": "webpack/style-loader",
"repo": "webpack-contrib/style-loader",
"npm": "style-loader",
"description": "Load and inject stylesheets into the DOM.",
"maintainer": "sokra"
},
{
"repo": "webpack/css-loader",
"repo": "webpack-contrib/css-loader",
"npm": "css-loader",
"description": "Load CSS modules and resolve any dependencies.",
"maintainer": "sokra"
Expand All @@ -85,13 +85,13 @@
"maintainer": "sokra"
},
{
"repo": "webpack/json-loader",
"repo": "webpack-contrib/json-loader",
"npm": "json-loader",
"description": "Load JSON into a pre-parsed variable.",
"maintainer": ""
},
{
"repo": "webpack/url-loader",
"repo": "webpack-contrib/url-loader",
"npm": "url-loader",
"description": "Load files into data urls based on byte limit.",
"maintainer": ""
Expand All @@ -103,55 +103,55 @@
"maintainer": ""
},
{
"repo": "webpack/extract-text-webpack-plugin",
"repo": "webpack-contrib/extract-text-webpack-plugin",
"npm": "extract-text-webpack-plugin",
"description": "Extract text from a bundle into a file.",
"maintainer": ""
},
{
"repo": "jtangelder/sass-loader",
"repo": "webpack-contrib/sass-loader",
"npm": "sass-loader",
"description": "Load and parse SASS modules into CSS.",
"maintainer": "jhnns"
},
{
"repo": "webpack/karma-webpack",
"repo": "webpack-contrib/karma-webpack",
"npm": "karma-webpack",
"description": "Use webpack to pre-process files in karma.",
"maintainer": "MikaAK"
},
{
"repo": "webpack/imports-loader",
"repo": "webpack-contrib/imports-loader",
"npm": "imports-loader",
"description": "Detect and import libraries based on the use of certain variables.",
"maintainer": ""
},
{
"repo": "webpack/raw-loader",
"repo": "webpack-contrib/raw-loader",
"npm": "raw-loader",
"description": "Load a module's contents as a string.",
"maintainer": ""
},
{
"repo": "webpack/exports-loader",
"repo": "webpack-contrib/exports-loader",
"npm": "exports-loader",
"description": "Load a module's contents directly into export statements.",
"maintainer": ""
},
{
"repo": "webpack/less-loader",
"repo": "webpack-contrib/less-loader",
"npm": "less-loader",
"description": "Load and parse LESS modules into CSS.",
"maintainer": ""
},
{
"repo": "webpack/expose-loader",
"repo": "webpack-contrib/expose-loader",
"npm": "expose-loader",
"description": "Expose modules as global variables.",
"maintainer": ""
},
{
"repo": "webpack/html-loader",
"repo": "webpack-contrib/html-loader",
"npm": "html-loader",
"description": "Load HTML modules/templates as strings.",
"maintainer": "hemanth"
Expand All @@ -163,7 +163,7 @@
"maintainer": ""
},
{
"repo": "webpack/script-loader",
"repo": "webpack-contrib/script-loader",
"npm": "script-loader",
"description": "Load and execute scripts once in the global context.",
"maintainer": ""
Expand All @@ -175,109 +175,109 @@
"maintainer": "shama"
},
{
"repo": "webpack/source-map-loader",
"repo": "webpack-contrib/source-map-loader",
"npm": "source-map-loader",
"description": "Extract source-map comments from modules to pass to webpack.",
"maintainer": ""
},
{
"repo": "webpack/null-loader",
"repo": "webpack-contrib/null-loader",
"npm": "null-loader",
"description": "Load an empty module.",
"maintainer": ""
},
{
"repo": "webpack/compression-webpack-plugin",
"repo": "webpack-contrib/compression-webpack-plugin",
"npm": "compression-webpack-plugin",
"description": "Compress assets to serve with Content-Encoding.",
"maintainer": "palmerj3"
},
{
"repo": "webpack/transform-loader",
"repo": "webpack-contrib/transform-loader",
"npm": "transform-loader",
"description": "Load modules with browserify transforms.",
"maintainer": "minwe"
},
{
"repo": "webpack/grunt-webpack",
"repo": "webpack-contrib/grunt-webpack",
"npm": "grunt-webpack",
"description": "Integrate webpack into a grunt build process.",
"maintainer": "danez"
},
{
"repo": "webpack/jshint-loader",
"repo": "webpack-contrib/jshint-loader",
"npm": "jshint-loader",
"description": "Load and lint modules with JSHint.",
"maintainer": "kostasmanionis"
},
{
"repo": "webpack/bundle-loader",
"repo": "webpack-contrib/bundle-loader",
"npm": "bundle-loader",
"description": "Load a module and it's children into a separate bundle.",
"maintainer": ""
},
{
"repo": "webpack/coffee-loader",
"repo": "webpack-contrib/coffee-loader",
"npm": "coffee-loader",
"description": "Load and parse coffee script modules into JS.",
"maintainer": ""
},
{
"repo": "webpack/worker-loader",
"repo": "webpack-contrib/worker-loader",
"npm": "worker-loader",
"description": "Load modules as workers.",
"maintainer": ""
},
{
"repo": "webpack/mocha-loader",
"repo": "webpack-contrib/mocha-loader",
"npm": "mocha-loader",
"description": "Load mocha modules for testing.",
"maintainer": "tricoder42"
},
{
"repo": "webpack/react-proxy-loader",
"repo": "webpack-contrib/react-proxy-loader",
"npm": "react-proxy-loader",
"description": "Wrap a react component in a proxy component to enable Code Splitting.",
"maintainer": ""
},
{
"repo": "webpack/multi-loader",
"repo": "webpack-contrib/multi-loader",
"npm": "multi-loader",
"description": "Split a module and import each piece with different loaders.",
"maintainer": ""
},
{
"repo": "webpack/val-loader",
"repo": "webpack-contrib/val-loader",
"npm": "val-loader",
"description": "Load and execute a module while compiling, returning the result.",
"maintainer": ""
},
{
"repo": "webpack/i18n-webpack-plugin",
"repo": "webpack-contrib/i18n-webpack-plugin",
"npm": "i18n-webpack-plugin",
"description": "Embed localization into your bundle.",
"maintainer": ""
},
{
"repo": "webpack/json5-loader",
"repo": "webpack-contrib/json5-loader",
"npm": "json5-loader",
"description": "Load JSON5 into a pre-parsed variable.",
"maintainer": "gdi2290"
},
{
"repo": "webpack/node-loader",
"repo": "webpack-contrib/node-loader",
"npm": "node-loader",
"description": "Load native node modules.",
"maintainer": ""
},
{
"repo": "webpack/coverjs-loader",
"repo": "webpack-contrib/coverjs-loader",
"npm": "coverjs-loader",
"description": "Test modules' code coverage using CoverJS.",
"maintainer": ""
},
{
"repo": "webpack/coffee-redux-loader",
"repo": "webpack-contrib/coffee-redux-loader",
"npm": "coffee-redux-loader",
"description": "Load coffee script modules.",
"maintainer": ""
Expand Down
9 changes: 4 additions & 5 deletions src/components/PageLinks/PageLinks.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
import TrimEnd from 'lodash/trimEnd';
import Url from 'url';
import './PageLinks.scss';

const baseURL = 'https://github.com/webpack/webpack.js.org/edit/master/';

export default ({
page = {},
...props
}) => {
let baseURL = 'https://github.com/webpack/webpack.js.org/edit/master/src/content';
let indexPath = page.type === 'index' ? '/index' : '';
let mainPath = page.url.startsWith('/') ? page.url : `/${page.url}`;
let editLink = page.edit || baseURL + TrimEnd(mainPath, '/') + indexPath + '.md';
const editLink = page.edit || Url.resolve(baseURL, page.path);
Copy link
Member

Choose a reason for hiding this comment

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

Nice!


// TODO: Make sure we add `repo` / `edit` and address `type` (above)
return (
Expand Down
6 changes: 5 additions & 1 deletion src/components/SidebarItem/SidebarItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export default class SidebarItem extends React.Component {
if ( `/${currentPage}` === url ) {
return `#${anchor.id}`;

} else return `${url}#${anchor.id}`;
} else if (!anchor.id) {
return url;
} else {
return `${url}#${anchor.id}`;
}
}
}
Loading