diff --git a/.gitignore b/.gitignore index 61e7a48..4394572 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,29 @@ +# dependencies +node_modules + +# production +build + +# generated files +.docusaurus +.cache-loader + +# misc .DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* *.log -node_modules -docs -converted-docs + +# lock package-lock.json yarn.lock -website/build + +# generated +docs +converted-docs diff --git a/.npmrc b/.npmrc index 43c97e7..cf86fe1 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ package-lock=false +loglevel=error diff --git a/README.md b/README.md index c248ef4..be81253 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,36 @@ This is the repository containing the code for the official gulp website [gulpjs ![A screenshot of gulpjs.com](screenshot.png) ## Contributing +This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. + +### Getting started To get started working on this site you first need to clone this repository + ``` -$ git clone https://github.com/gulpjs/gulpjs.github.io.git +$ git clone git://github.com/gulpjs/gulpjs.github.io ``` -__The rest is a work in progress, we'll update once things are working__ - When you are done making your improvements, create a [Pull Request](https://github.com/gulpjs/gulpjs.github.io/compare). + +### Installation + +``` +$ npm install +``` + +### Local Development + +``` +$ npm start +``` + +This command will first pull down the markdown documentation from the main gulp repository, then starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. + +### Build + +``` +$ npm build +``` + +This command generates static content into the `build` directory and can be served using any static contents hosting service. diff --git a/docusaurus.config.js b/docusaurus.config.js new file mode 100644 index 0000000..8373001 --- /dev/null +++ b/docusaurus.config.js @@ -0,0 +1,122 @@ +'use strict'; + +var isProd = process.env.NODE_ENV === 'production'; + +module.exports = { + title: 'gulp.js', + favicon: 'img/favicon.png', + url: 'https://gulpjs.com/', + baseUrl: '/', + tagline: 'The streaming build system', + // Used by the deployment + organizationName: 'gulpjs', + projectName: 'gulpjs.github.io', + // The theme + themeConfig: { + disableDarkMode: true, + navbar: { + logo: { + alt: 'gulp', + src: 'img/gulp.svg', + // TODO: Remove these when we have a homepage in the router + href: 'https://gulpjs.com/', + target: '_self', + }, + links: [ + { to: 'docs/en/getting-started/quick-start', + label: 'Getting Started', + position: 'left', + }, + { to: 'docs/en/api/concepts', + label: 'API', + position: 'left', + }, + { href: 'https://gulpjs.com/plugins', + label: 'Plugins', + position: 'left', + }, + { href: 'https://twitter.com/gulpjs', + logo: { + alt: 'Gulp on Twitter', + src: 'img/twitter.svg', + }, + position: 'right' + }, + { href: 'https://medium.com/gulpjs', + logo: { + alt: 'The gulp blog', + src: 'img/medium.svg', + }, + position: 'right' + }, + ] + }, + footer: { + links: [ + { items: [ + { html: 'gulp' } + ] + }, + { title: 'Docs', + items: [ + { to: 'docs/en/getting-started/quick-start', + label: 'Getting Started', + }, + { to: 'docs/en/api/concepts', + label: 'API', + }, + ] + }, + { title: 'Community', + items: [ + { href: 'https://github.com/gulpjs/gulp', + label: 'GitHub', + }, + { href: 'https://stackoverflow.com/questions/tagged/gulp', + label: 'Stack Overflow', + }, + { href: 'https://twitter.com/gulpjs', + label: 'Twitter', + } + ] + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} GulpJS`, + }, + prism: { + // One of: + // dracula, duotoneDark, duotoneLight, github, nightOwl, nightOwlLight, + // oceanicNext, palenight, shad esOfPurple, ultramin, vsDark + theme: require('prism-react-renderer/themes/vsDark'), + }, + algolia: { + apiKey: 'a6ef919bce0b83de1bcbad1d4ef753f8', + indexName: 'gulpjs', + algoliaOptions: {} // Optional, if provided by Algolia + }, + googleAnalytics: { + trackingID: 'UA-128126650-1', + }, + gtag: { + trackingID: 'UA-128126650-1', + }, + }, + themes: [ + ['@docusaurus/theme-classic', { + customCss: require.resolve('./src/css/docs.css') + }], + ['@docusaurus/theme-search-algolia', {}] + ], + plugins: [ + ['@docusaurus/plugin-content-docs', { + path: 'docs', + sidebarPath: require.resolve('./sidebars.json'), + // This is a holdover because we set up original docusaurus + // to support translations and v2 doesn't support them yet + routeBasePath: 'docs/en/', + }], + isProd && ['@docusaurus/plugin-google-analytics', {}], + isProd && ['@docusaurus/plugin-google-gtag', {}], + isProd && ['@docusaurus/plugin-sitemap', {}], + ] +}; diff --git a/gulpfile.js b/gulpfile.js index 0189803..40090d3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,60 +2,45 @@ // This file is only for generating the docs // No need to use any of this if working on the main website - -const { src, dest, series } = require('gulp'); -const pump = require('pump'); -const through2 = require('through2'); +const del = require('del'); +const gulplog = require('gulplog'); +const { series } = require('gulp'); const frontMatter = require('gray-matter'); const download = require('github-download-directory'); // Exports for task registration -exports.default = series(fetchDocs, convertComments); +exports.default = series(clean, generateDocs); const owner = 'gulpjs'; const repo = 'gulp'; const directory = 'docs'; -const outDirectory = 'converted-docs'; const fmOptions = { delimiters: [''] }; -function fetchDocs() { - return download(owner, repo, directory, { sha: "master" }); -} - -function convertComments(cb) { - pump([ - // Only process markdown files in the directory we fetched - src('**/*.md', { cwd: directory }), - pluginless(convertToDocusaurus), - // Overwrite the markdown files we fetched - dest(outDirectory) - ], cb) +async function clean() { + return del(directory); } -/* utils */ -function convertToDocusaurus(file) { - var config = frontMatter(file.contents, fmOptions); - if (!config.data.id) { - console.error(`File missing front-matter. Path: ${file.path}`); - return; // Filter out any file without frontmatter - } - - file.contents = Buffer.from(config.stringify()); +async function generateDocs() { + // Fetch + const files = await download.fetchFiles(owner, repo, directory, { sha: "master" }); - return file; -} + // Process + const docusaurusFiles = files.reduce((result, {path, contents}) => { + const config = frontMatter(contents, fmOptions); + if (!config.data.id) { + gulplog.debug(`File missing front-matter. Path: ${path}`); + return result; + } -function pluginless(fn) { - return through2.obj(handler); + return result.concat({ + path, + contents: Buffer.from(config.stringify()) + }); + }, []); - function handler(file, _, cb) { - try { - cb(null, fn(file)); - } catch(err) { - cb(err); - } - } + // Write + await Promise.all(docusaurusFiles.map(download.output)) } diff --git a/package.json b/package.json index af89b5b..1a65392 100644 --- a/package.json +++ b/package.json @@ -2,24 +2,46 @@ "name": "gulpjs.github.io", "version": "0.0.0", "private": true, + "engines": { + "node": ">=8.0.0" + }, "scripts": { - "clean": "rm -r docs converted-docs", "fetch-docs": "gulp", "prestart": "npm run fetch-docs", - "start": "cd website && npm run start", + "start": "docusaurus start", "prebuild": "npm run fetch-docs", - "build": "cd website && npm run build", - "pregh-pages": "npm run fetch-docs", - "gh-pages": "cd website && npm run publish-gh-pages" - }, - "engines": { - "node": ">=8.0.0" + "build": "docusaurus build", + "predeploy": "npm run fetch-docs", + "deploy": "docusaurus deploy", + "swizzle": "docusaurus swizzle" }, "devDependencies": { - "github-download-directory": "^1.1.1", + "@docusaurus/core": "^2.0.0-alpha.50", + "@docusaurus/plugin-content-docs": "^2.0.0-alpha.50", + "@docusaurus/plugin-google-analytics": "^2.0.0-alpha.50", + "@docusaurus/plugin-google-gtag": "^2.0.0-alpha.50", + "@docusaurus/plugin-sitemap": "^2.0.0-alpha.50", + "@docusaurus/theme-classic": "^2.0.0-alpha.50", + "@docusaurus/theme-search-algolia": "^2.0.0-alpha.50", + "del": "^5.1.0", + "github-download-directory": "^1.2.0", "gray-matter": "^3.1.1", - "gulp": "^4.0.0", - "pump": "^2.0.1", - "through2": "^2.0.3" + "gulp": "^4.0.2", + "gulplog": "^1.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "remark-admonitions": "^1.2.1" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] } } diff --git a/website/sidebars.json b/sidebars.json similarity index 100% rename from website/sidebars.json rename to sidebars.json diff --git a/src/css/docs.css b/src/css/docs.css new file mode 100644 index 0000000..d2dfddb --- /dev/null +++ b/src/css/docs.css @@ -0,0 +1,190 @@ +:root { + --ifm-global-radius: 4px; + --ifm-background-color: var(--ifm-color-white); + /* Primary color */ + --ifm-color-primary: #cf4647; + --ifm-color-primary-dark: #c63334; + --ifm-color-primary-darker: #bb3132; + --ifm-color-primary-darkest: #9a2829; + --ifm-color-primary-light: #d55c5d; + --ifm-color-primary-lighter: #d86768; + --ifm-color-primary-lightest: #e08889; + /* Secondary color */ + --ifm-color-secondary: #20232a; + /* Navbar */ + --ifm-navbar-height: unset; + --ifm-navbar-item-padding-horizontal: 0.5rem; + --ifm-navbar-background-color: var(--ifm-color-primary); + --ifm-navbar-link-color: var(--ifm-color-white); + --ifm-navbar-link-hover-color: var(--ifm-color-white); + --ifm-navbar-link-hover-decoration: underline; + /* Search */ + --ifm-navbar-search-input-background-color: var(--ifm-color-primary-darkest); + --ifm-navbar-search-input-color: var(--ifm-color-white); + --ifm-navbar-search-input-placeholder-color: var(--ifm-color-white); + --ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,'); + /* Footer */ + --ifm-footer-background-color: var(--ifm-color-secondary); + --ifm-footer-color: var(--ifm-color-white); + --ifm-footer-link-color: var(--ifm-color-white); + /* Tables */ + --ifm-table-border-width: 0; + --ifm-table-head-background: var(--ifm-color-primary); + --ifm-table-head-color: var(--ifm-color-white); + --ifm-table-stripe-background: rgba(76, 76, 76, 0.1); + /* Button */ + --ifm-button-background-color: var(--ifm-color-primary); +} + +/* Element defaults */ +small { + font-size: 14px; + font-style: italic; +} + +i { + font-style: normal; +} + +/* hash links */ +h1 .hash-link { + display: none; +} + +/* Navbar */ +.navbar .navbar__logo { + max-width: unset; +} + +.navbar .navbar__toggle { + color: var(--ifm-navbar-link-color); +} + +.navbar .navbar__link:hover { + text-decoration: var(--ifm-navbar-link-hover-decoration); +} + +@media (max-width: 996px) { + .navbar .navbar__item { + display: unset; + } +} + +/* Buttons */ +.button.button--secondary { + --ifm-button-border-color: var(--ifm-color-white); +} + +.button.button--secondary:not(.button--outline) { + --ifm-button-background-color: var(--ifm-color-primary); + + color: var(--ifm-color-white); +} + +.button.button--secondary:not(.button--outline):hover { + --ifm-button-background-color: var(--ifm-color-primary); + --ifm-button-border-color: var(--ifm-color-white); +} + +.button.button.button--secondary:active, +.button.button.button--secondary.button--active { + --ifm-button-background-color: var(--ifm-color-primary); + --ifm-button-border-color: var(--ifm-color-white); + background-color: var(--ifm-color-primary); + border-color: var(--ifm-color-white); +} + +/* Tables */ +th, td { + text-align: start; +} + +th[align="center"], +td[align="center"] { + text-align: center; +} + +table tr th code, +table tr td code { + word-break: normal; +} + +table tr th:last-child, +table tr td:last-child { + min-width: 175px; +} + +table tr th + th + th:last-child, +table tr td + td + td:last-child { + min-width: 320px; + width: 100%; +} + +/* Code Blocks */ +.prism-code { + margin-top: 2rem; + margin-bottom: 2rem; + border-radius: var(--ifm-global-radius); +} + +/* Search */ +.navbar .navbar__search .navbar__search-input { + width: 15.5rem; + border-radius: var(--ifm-global-radius); +} + +/* Footer (for logo) */ +.footer__col:first-of-type .footer__item { + text-align: center; +} +.footer__item img { + width: 60px; +} + +@media only screen and (max-width: 720px) { + table { + box-shadow: -10px 0px 10px -10px #000000 inset; + } +} + +/* TODO: These will need to be update when "Enterprise" is added */ +@media only screen and (max-width: 767px) { + .navbar .navbar__items { + padding-top: var(--ifm-navbar-item-padding-vertical); + padding-bottom: var(--ifm-navbar-item-padding-vertical); + justify-content: space-around; + } + + .navbar .navbar__items.navbar__items--right { + justify-content: space-around; + } +} + +@media only screen and (min-width: 768px) { + .navbar .navbar__search .navbar__search-input { + width: 12.5rem; + transition: width 0.5s ease 0s; + } + + .navbar .navbar__search .navbar__search-input:active, + .navbar .navbar__search .navbar__search-input:focus { + width: 16.5rem; + } +} + + +@media only screen and (max-width: 996px) { + .footer .col.col.col { + --ifm-col-width: 33%; + } +} + +@media only screen and (max-width: 375px) { + /* This is our logo */ + .footer__col:first-of-type { + display: none; + } + .footer .col.col.col { + --ifm-col-width: 50%; + } +} diff --git a/src/theme/Navbar/index.js b/src/theme/Navbar/index.js new file mode 100644 index 0000000..8c7808d --- /dev/null +++ b/src/theme/Navbar/index.js @@ -0,0 +1,191 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import React, {useCallback, useState} from 'react'; +import classnames from 'classnames'; +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import isInternalUrl from '@docusaurus/isInternalUrl'; + +import SearchBar from '@theme/SearchBar'; +import Toggle from '@theme/Toggle'; +import useThemeContext from '@theme/hooks/useThemeContext'; +import useHideableNavbar from '@theme/hooks/useHideableNavbar'; +import useLogo from '@theme/hooks/useLogo'; + +import styles from './styles.module.css'; + + +const useLinkLogo = (logo = {}) => { + const { + siteConfig: {baseUrl} = {}, + } = useDocusaurusContext(); + const {isDarkTheme} = useThemeContext(); + const logoLink = logo.href || baseUrl; + let logoLinkProps = {}; + + if (logo.target) { + logoLinkProps = {target: logo.target}; + } else if (!isInternalUrl(logoLink)) { + logoLinkProps = { + rel: 'noopener noreferrer', + target: '_blank', + }; + } + + const logoSrc = logo.srcDark && isDarkTheme ? logo.srcDark : logo.src; + const logoImageUrl = useBaseUrl(logoSrc); + + return { + logoImageUrl, + logoAlt: logo.alt, + }; +}; + +function NavLink({activeBasePath, to, href, logo, label, position, ...props}) { + const toUrl = useBaseUrl(to); + const activeBaseUrl = useBaseUrl(activeBasePath); + const {logoImageUrl, logoAlt} = useLinkLogo(logo); + + const content = logoImageUrl != null ? {logoAlt} : label; + + return ( + + location.pathname.startsWith(activeBaseUrl), + } + : null), + })} + {...props}> + {content} + + ); +} + +function NavItem({items, position, ...props}) { + if (!items) { + return ; + } + + return ( +
+ + {props.label} + + +
+ ); +} + + +function Navbar() { + const { + siteConfig: { + themeConfig: { + navbar: {title, links = [], hideOnScroll = false} = {}, + disableDarkMode = false, + }, + }, + isClient, + } = useDocusaurusContext(); + const [isSearchBarExpanded, setIsSearchBarExpanded] = useState(false); + + const {isDarkTheme, setLightTheme, setDarkTheme} = useThemeContext(); + const {navbarRef, isNavbarVisible} = useHideableNavbar(hideOnScroll); + const {logoLink, logoLinkProps, logoImageUrl, logoAlt} = useLogo(); + + const onToggleChange = useCallback( + e => (e.target.checked ? setDarkTheme() : setLightTheme()), + [setLightTheme, setDarkTheme], + ); + + return ( + + ); +} + +export default Navbar; diff --git a/src/theme/Navbar/styles.module.css b/src/theme/Navbar/styles.module.css new file mode 100644 index 0000000..04c3a9e --- /dev/null +++ b/src/theme/Navbar/styles.module.css @@ -0,0 +1,35 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +@media screen and (max-width: 997px) { + .displayOnlyInLargeViewport { + display: none !important; + } +} + +@media (max-width: 360px) { + .hideLogoText { + display: none; + } +} + +.navbarHideable { + transition: top 0.2s ease-in-out; +} + +.navbarHidden { + top: calc(var(--ifm-navbar-height) * -1) !important; +} + +.noWrap { + white-space: nowrap; +} + +.navbarIcon { + vertical-align: middle; + max-width: unset; +} diff --git a/website/static/.nojekyll b/static/.nojekyll similarity index 100% rename from website/static/.nojekyll rename to static/.nojekyll diff --git a/website/static/CNAME b/static/CNAME similarity index 100% rename from website/static/CNAME rename to static/CNAME diff --git a/website/static/css/devices.css b/static/css/devices.css similarity index 100% rename from website/static/css/devices.css rename to static/css/devices.css diff --git a/website/static/css/homepage.css b/static/css/homepage.css similarity index 100% rename from website/static/css/homepage.css rename to static/css/homepage.css diff --git a/website/static/img/atom.svg b/static/img/atom.svg similarity index 100% rename from website/static/img/atom.svg rename to static/img/atom.svg diff --git a/website/static/img/book.svg b/static/img/book.svg similarity index 100% rename from website/static/img/book.svg rename to static/img/book.svg diff --git a/website/static/img/browser.svg b/static/img/browser.svg similarity index 100% rename from website/static/img/browser.svg rename to static/img/browser.svg diff --git a/website/static/img/cli.svg b/static/img/cli.svg similarity index 100% rename from website/static/img/cli.svg rename to static/img/cli.svg diff --git a/website/static/img/docs-gulp-command.png b/static/img/docs-gulp-command.png similarity index 100% rename from website/static/img/docs-gulp-command.png rename to static/img/docs-gulp-command.png diff --git a/website/static/img/docs-gulp-tasks-command.png b/static/img/docs-gulp-tasks-command.png similarity index 100% rename from website/static/img/docs-gulp-tasks-command.png rename to static/img/docs-gulp-tasks-command.png diff --git a/website/static/img/docs-gulp-version-command.png b/static/img/docs-gulp-version-command.png similarity index 100% rename from website/static/img/docs-gulp-version-command.png rename to static/img/docs-gulp-version-command.png diff --git a/website/static/img/docs-node-version-command.png b/static/img/docs-node-version-command.png similarity index 100% rename from website/static/img/docs-node-version-command.png rename to static/img/docs-node-version-command.png diff --git a/website/static/img/docs-npm-version-command.png b/static/img/docs-npm-version-command.png similarity index 100% rename from website/static/img/docs-npm-version-command.png rename to static/img/docs-npm-version-command.png diff --git a/website/static/img/docs-npx-version-command.png b/static/img/docs-npx-version-command.png similarity index 100% rename from website/static/img/docs-npx-version-command.png rename to static/img/docs-npx-version-command.png diff --git a/website/static/img/favicon.png b/static/img/favicon.png similarity index 100% rename from website/static/img/favicon.png rename to static/img/favicon.png diff --git a/website/static/img/guage.svg b/static/img/guage.svg similarity index 100% rename from website/static/img/guage.svg rename to static/img/guage.svg diff --git a/website/static/img/gulp-shirt-photo.jpg b/static/img/gulp-shirt-photo.jpg similarity index 100% rename from website/static/img/gulp-shirt-photo.jpg rename to static/img/gulp-shirt-photo.jpg diff --git a/website/static/img/gulp-white-logo.svg b/static/img/gulp-white-logo.svg similarity index 100% rename from website/static/img/gulp-white-logo.svg rename to static/img/gulp-white-logo.svg diff --git a/website/static/img/gulp-white-text.svg b/static/img/gulp-white-text.svg similarity index 100% rename from website/static/img/gulp-white-text.svg rename to static/img/gulp-white-text.svg diff --git a/website/static/img/gulp.jpg b/static/img/gulp.jpg similarity index 100% rename from website/static/img/gulp.jpg rename to static/img/gulp.jpg diff --git a/website/static/img/gulp.svg b/static/img/gulp.svg similarity index 100% rename from website/static/img/gulp.svg rename to static/img/gulp.svg diff --git a/static/img/medium.svg b/static/img/medium.svg new file mode 100644 index 0000000..dfb3921 --- /dev/null +++ b/static/img/medium.svg @@ -0,0 +1,3 @@ + + + diff --git a/website/static/img/new-gulp-shirt.jpg b/static/img/new-gulp-shirt.jpg similarity index 100% rename from website/static/img/new-gulp-shirt.jpg rename to static/img/new-gulp-shirt.jpg diff --git a/website/static/img/opencollective.svg b/static/img/opencollective.svg similarity index 100% rename from website/static/img/opencollective.svg rename to static/img/opencollective.svg diff --git a/website/static/img/pipe-error.png b/static/img/pipe-error.png similarity index 100% rename from website/static/img/pipe-error.png rename to static/img/pipe-error.png diff --git a/website/static/img/pump-error.png b/static/img/pump-error.png similarity index 100% rename from website/static/img/pump-error.png rename to static/img/pump-error.png diff --git a/website/static/img/tidelift.png b/static/img/tidelift.png similarity index 100% rename from website/static/img/tidelift.png rename to static/img/tidelift.png diff --git a/static/img/twitter.svg b/static/img/twitter.svg new file mode 100644 index 0000000..893004b --- /dev/null +++ b/static/img/twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/website/static/index.html b/static/index.html similarity index 100% rename from website/static/index.html rename to static/index.html diff --git a/website/static/js/script.js b/static/js/script.js similarity index 100% rename from website/static/js/script.js rename to static/js/script.js diff --git a/website/README.md b/website/README.md deleted file mode 100644 index f3da77f..0000000 --- a/website/README.md +++ /dev/null @@ -1,193 +0,0 @@ -This website was created with [Docusaurus](https://docusaurus.io/). - -# What's In This Document - -* [Get Started in 5 Minutes](#get-started-in-5-minutes) -* [Directory Structure](#directory-structure) -* [Editing Content](#editing-content) -* [Adding Content](#adding-content) -* [Full Documentation](#full-documentation) - -# Get Started in 5 Minutes - -1. Make sure all the dependencies for the website are installed: - -```sh -# Install dependencies -$ yarn -``` -2. Run your dev server: - -```sh -# Start the site -$ yarn start -``` - -## Directory Structure - -Your project file structure should look something like this - -``` -my-docusaurus/ - docs/ - doc-1.md - doc-2.md - doc-3.md - website/ - blog/ - 2016-3-11-oldest-post.md - 2017-10-24-newest-post.md - core/ - node_modules/ - pages/ - static/ - css/ - img/ - package.json - sidebar.json - siteConfig.js -``` - -# Editing Content - -## Editing an existing docs page - -Edit docs by navigating to `docs/` and editing the corresponding document: - -`docs/doc-to-be-edited.md` - -```markdown ---- -id: page-needs-edit -title: This Doc Needs To Be Edited ---- - -Edit me... -``` - -For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Editing an existing blog post - -Edit blog posts by navigating to `website/blog` and editing the corresponding post: - -`website/blog/post-to-be-edited.md` -```markdown ---- -id: post-needs-edit -title: This Blog Post Needs To Be Edited ---- - -Edit me... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -# Adding Content - -## Adding a new docs page to an existing sidebar - -1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: - -```md ---- -id: newly-created-doc -title: This Doc Needs To Be Edited ---- - -My new content here.. -``` - -1. Refer to that doc's ID in an existing sidebar in `website/sidebar.json`: - -```javascript -// Add newly-created-doc to the Getting Started category of docs -{ - "docs": { - "Getting Started": [ - "quick-start", - "newly-created-doc" // new doc here - ], - ... - }, - ... -} -``` - -For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding a new blog post - -1. Make sure there is a header link to your blog in `website/siteConfig.js`: - -`website/siteConfig.js` -```javascript -headerLinks: [ - ... - { blog: true, label: 'Blog' }, - ... -] -``` - -2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: - -`website/blog/2018-05-21-New-Blog-Post.md` - -```markdown ---- -author: Frank Li -authorURL: https://twitter.com/foobarbaz -authorFBID: 503283835 -title: New Blog Post ---- - -Lorem Ipsum... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -## Adding items to your site's top navigation bar - -1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: - -`website/siteConfig.js` -```javascript -{ - headerLinks: [ - ... - /* you can add docs */ - { doc: 'my-examples', label: 'Examples' }, - /* you can add custom pages */ - { page: 'help', label: 'Help' }, - /* you can add external links */ - { href: 'https://github.com/facebook/Docusaurus', label: 'GitHub' }, - ... - ], - ... -} -``` - -For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding custom pages - -1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: -1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: - -`website/siteConfig.js` -```javascript -{ - headerLinks: [ - ... - { page: 'my-new-custom-page', label: 'My New Custom Page' }, - ... - ], - ... -} -``` - -For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). - -# Full Documentation - -Full documentation can be found on the [website](https://docusaurus.io/). diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100644 index 1afdecb..0000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return `${baseUrl}docs/${language ? `${language}/` : ''}${doc}`; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? `${language}/` : '') + doc; - } - - render() { - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/i18n/en.json b/website/i18n/en.json deleted file mode 100644 index 05f564f..0000000 --- a/website/i18n/en.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "_comment": "This file is auto-generated by write-translations.js", - "localized-strings": { - "next": "Next", - "previous": "Previous", - "tagline": "The streaming build system", - "docs": { - "api/concepts": { - "title": "API Concepts", - "sidebar_label": "Concepts" - }, - "api/dest": { - "title": "dest()", - "sidebar_label": "dest()" - }, - "api/lastrun": { - "title": "lastRun()", - "sidebar_label": "lastRun()" - }, - "api/parallel": { - "title": "parallel()", - "sidebar_label": "parallel()" - }, - "api/registry": { - "title": "registry()", - "sidebar_label": "registry()" - }, - "api/series": { - "title": "series()", - "sidebar_label": "series()" - }, - "api/src": { - "title": "src()", - "sidebar_label": "src()" - }, - "api/symlink": { - "title": "symlink()", - "sidebar_label": "symlink()" - }, - "api/task": { - "title": "task()", - "sidebar_label": "task()" - }, - "api/tree": { - "title": "tree()", - "sidebar_label": "tree()" - }, - "api/vinyl-iscustomprop": { - "title": "Vinyl.isCustomProp()", - "sidebar_label": "Vinyl.isCustomProp()" - }, - "api/vinyl-isvinyl": { - "title": "Vinyl.isVinyl()", - "sidebar_label": "Vinyl.isVinyl()" - }, - "api/vinyl": { - "title": "Vinyl", - "sidebar_label": "Vinyl" - }, - "api/watch": { - "title": "watch()", - "sidebar_label": "watch()" - }, - "documentation-missing": { - "title": "Documentation Missing" - }, - "getting-started/quick-start": { - "title": "Quick Start", - "sidebar_label": "Quick Start" - }, - "getting-started/javascript-and-gulpfiles": { - "title": "JavaScript and Gulpfiles", - "sidebar_label": "JavaScript and Gulpfiles" - }, - "getting-started/creating-tasks": { - "title": "Creating Tasks", - "sidebar_label": "Creating Tasks" - }, - "getting-started/async-completion": { - "title": "Async Completion", - "sidebar_label": "Async Completion" - }, - "getting-started/working-with-files": { - "title": "Working with Files", - "sidebar_label": "Working with Files" - }, - "getting-started/explaining-globs": { - "title": "Explaining Globs", - "sidebar_label": "Explaining Globs" - }, - "getting-started/using-plugins": { - "title": "Using Plugins", - "sidebar_label": "Using Plugins" - }, - "getting-started/watching-files": { - "title": "Watching Files", - "sidebar_label": "Watching Files" - } - }, - "links": { - "Getting Started": "Getting Started", - "API": "API", - "Plugins": "Plugins", - "Twitter": "Twitter", - "Blog": "Blog" - }, - "categories": { - "Getting Started": "Getting Started", - "API": "API" - } - }, - "pages-strings": { - "Help Translate|recruit community translators for your project": "Help Translate", - "Edit this Doc|recruitment message asking to edit the doc source": "Edit", - "Translate this Doc|recruitment message asking to translate the docs": "Translate" - } -} diff --git a/website/package.json b/website/package.json deleted file mode 100644 index d1af394..0000000 --- a/website/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.6.0" - } -} diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100755 index 512e335..0000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -const siteConfig = require(`${process.cwd()}/siteConfig.js`); - -function docUrl(doc, language) { - return `${siteConfig.baseUrl}docs/${language ? `${language}/` : ''}${doc}`; -} - -class Help extends React.Component { - render() { - const language = this.props.language || ''; - const supportLinks = [ - { - content: `Learn more using the [documentation on this site.](${docUrl( - 'doc1.html', - language, - )})`, - title: 'Browse Docs', - }, - { - content: 'Ask questions about the documentation and project', - title: 'Join the community', - }, - { - content: "Find out what's new with this project", - title: 'Stay up to date', - }, - ]; - - return ( -
- -
-
-

Need help?

-
-

This project is maintained by a dedicated group of people.

- -
-
-
- ); - } -} - -module.exports = Help; diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index 331d371..0000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,45 +0,0 @@ -const siteConfig = { - disableHeaderTitle: true, - disableHeaderTagline: true, - title: 'gulp.js', - tagline: 'The streaming build system', - url: 'https://gulpjs.com/', - baseUrl: '/', - customDocsPath: 'converted-docs', - organizationName: 'gulpjs', - projectName: 'gulpjs.github.io', - headerLinks: [ - { doc: 'getting-started/quick-start', label: 'Getting Started' }, - { doc: 'api/concepts', label: 'API' }, - { href: 'https://gulpjs.com/plugins', label: 'Plugins' }, - { href: 'https://twitter.com/gulpjs', label: 'Twitter' }, - { href: 'https://medium.com/gulpjs', label: 'Blog' }, - { search: true }, - ], - headerIcon: 'img/gulp.svg', - footerIcon: 'img/gulp.svg', - favicon: 'img/favicon.png', - colors: { - primaryColor: '#cf4647', - secondaryColor: '#cf4647', - }, - copyright: `Copyright © ${new Date().getFullYear()} GulpJS`, - highlight: { - theme: 'tomorrow-night', - }, - separateCss: ['static/css'], - onPageNav: 'separate', - cleanUrl: true, - useEnglishUrl: true, - scripts: ['https://buttons.github.io/buttons.js'], - repoUrl: 'https://github.com/gulpjs/gulp', - algolia: { - apiKey: 'a6ef919bce0b83de1bcbad1d4ef753f8', - indexName: 'gulpjs', - algoliaOptions: {} // Optional, if provided by Algolia - }, - gaGtag: true, - gaTrackingId: 'UA-128126650-1', -}; - -module.exports = siteConfig; diff --git a/website/static/docs-css/custom.css b/website/static/docs-css/custom.css deleted file mode 100644 index 3e0064e..0000000 --- a/website/static/docs-css/custom.css +++ /dev/null @@ -1,227 +0,0 @@ -/* your custom css */ - -small { - font-size: 14px; - font-style: italic; -} - -code { - background-color: rgba(27, 31, 35, 0.1); -} - -h1 { - margin-top: 0; -} - -i { - font-style: normal; -} - -body, -.mainContainer, -nav.toc .toggleNav, -nav.toc .toggleNav .navGroup, -nav.toc .toggleNav .navGroup.navGroupActive { - background: #fff; -} - -.mainContainer { - padding: 40px 0; -} - -.mainContainer .wrapper blockquote p { - padding: 0; -} - -.mainContainer .wrapper .post .postHeader { - margin-bottom: 0; -} - -nav.toc .toggleNav .navToggle::before, -nav.toc .toggleNav .navToggle::after { - border-color: #fff; -} - -nav.toc .toggleNav .navToggle i::before, -nav.toc .toggleNav .navToggle i::after { - border-color: transparent #fff; -} - -.navBreadcrumb i { - color: #fff; -} - -.navBreadcrumb span { - color: #fff; -} - -.docsNavContainer { - background: none; -} - -.docsNavContainer nav.toc .navBreadcrumb, -.docsSliderActive nav.toc .navBreadcrumb { - background: #cf4647; - border-top: 2px solid #fff; -} - -.navigationSlider .slidingNav ul { - justify-content: space-around; - flex-wrap: wrap; -} - -.navigationSlider .slidingNav ul li a { - color: #fff; - padding: 10px 20px; -} - -/* Tables */ -table { - border: none; - display: block; - overflow-x: auto; -} - -table thead { - border: none; -} - -table tr { - border: none; -} - -table tr th { - text-transform: none; - color: #fff; - border: none; -} - -table tr th, -table tr td { - border: none; -} - -table tr th code, -table tr td code { - word-break: normal; -} - -table tr th:last-child, -table tr td:last-child { - min-width: 175px; -} - -table tr th + th + th:last-child, -table tr td + td + td:last-child { - min-width: 320px; - width: 100%; -} - -table tr:nth-of-type(odd) { - background: none; -} - -table tbody tr:nth-of-type(even) { - background-color: rgba(76, 76, 76, 0.1); -} - -table thead tr:nth-of-type(odd) { - background-color: #cf4547; -} - -/* Code Blocks */ -.hljs { - margin-top: 2rem; - margin-bottom: 2rem; -} - -/* Search */ -input#search_input_react { - line-height: 25px; - border-radius: 4px; -} - -input#search_input_react:focus, -input#search_input_react:active { - background-color: #a91b1c; -} - -@media (max-width: 375px) { - .logo { - display: initial; - } -} - -@media only screen and (max-width: 488px) { - .fixedHeaderContainer a { - display: none; - } - .navSearchWrapper { - display: none; - } - - .navigationSlider .slidingNav ul { - margin-top: 0; - } -} - -@media only screen and (max-width: 735px) { - - .docs-next { - clear: unset; - float: right; - } - - table { - box-shadow: -10px 0px 10px -10px #000000 inset; - display: inline-block; - max-width: 100%; - width: unset; - } -} - - -@media only screen and (min-device-width: 360px) and (max-device-width: 736px) { - /* Better use of screen on mobile */ - .wrapper { - width: 100%; - } -} - -@media only screen and (min-width: 1024px) { - .docMainWrapper > * { - margin: 0 10px; - } - - .docsNavContainer { - height: unset; - } - - .docOnPageNav, - .separateOnPageNav .docsNavContainer { - flex: 1 0 180px; - } -} - -@media only screen and (max-width: 1023px) { - .mainContainer { - padding-top: 50px; - } -} - -@media only screen and (max-width: 1024px) { - .reactNavSearchWrapper input#search_input_react { - line-height: 25px; - border-radius: 4px; - } - .reactNavSearchWrapper input#search_input_react:focus, - .reactNavSearchWrapper input#search_input_react:active { - background-color: #a91b1c; - } -} - -@media only screen and (min-width: 1400px) { -} - -@media only screen and (min-width: 1500px) { -} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy