From 33044ff9b72dc770caaa518092de078266affddf Mon Sep 17 00:00:00 2001 From: Daniel Albuquerque Date: Wed, 7 Jul 2021 08:05:52 +0100 Subject: [PATCH] Update to docusaurus v2 --- docs/about/introduction.md | 2 +- docs/assets/pitchfork_logo.svg | 2 + website/README.md | 193 - website/core/Footer.js | 85 - website/docusaurus.config.js | 78 + website/package.json | 19 +- website/pages/en/help.js | 54 - website/pages/en/index.js | 141 - website/pages/en/users.js | 48 - website/siteConfig.js | 95 - website/src/css/customTheme.css | 9 + website/src/pages/index.js | 7 + website/yarn.lock | 6632 ------------------------------- 13 files changed, 111 insertions(+), 7254 deletions(-) delete mode 100755 website/README.md delete mode 100755 website/core/Footer.js create mode 100644 website/docusaurus.config.js delete mode 100755 website/pages/en/help.js delete mode 100755 website/pages/en/index.js delete mode 100755 website/pages/en/users.js delete mode 100644 website/siteConfig.js create mode 100644 website/src/css/customTheme.css create mode 100644 website/src/pages/index.js delete mode 100644 website/yarn.lock diff --git a/docs/about/introduction.md b/docs/about/introduction.md index 1dfdc9e3..61d61345 100644 --- a/docs/about/introduction.md +++ b/docs/about/introduction.md @@ -4,7 +4,7 @@ title: Introduction ---

- Pitchfork + Pitchfork

Pitchfork lifts Zipkin tracing data into Haystack. diff --git a/docs/assets/pitchfork_logo.svg b/docs/assets/pitchfork_logo.svg index afd7b3b3..ae8dadc7 100644 --- a/docs/assets/pitchfork_logo.svg +++ b/docs/assets/pitchfork_logo.svg @@ -1,3 +1,5 @@ +--- +--- -
- - {this.props.config.footerIcon && ( -
{this.props.config.title} - )} - -
-
Docs
- - Introduction - -
-
-
Community
- - User Showcase - -
-
-
More
- GitHub - - Star - -
- - - - Expedia Group Open Source - -
{this.props.config.copyright}
- - ); - } -} - -module.exports = Footer; diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js new file mode 100644 index 00000000..d4432790 --- /dev/null +++ b/website/docusaurus.config.js @@ -0,0 +1,78 @@ +module.exports={ + "title": "Pitchfork", + "tagline": "Convert tracing data between Zipkin and Haystack formats", + "url": "https://expediagroup.github.io", + "baseUrl": "/pitchfork/", + "organizationName": "ExpediaGroup", + "projectName": "Pitchfork", + "scripts": [ + "https://buttons.github.io/buttons.js" + ], + "favicon": "img/pitchfork_devil.svg", + "customFields": { + "users": [ + { + "caption": "Hotels.com", + "image": "img/hotels_logo.svg", + "infoLink": "https://www.hotels.com", + "pinned": true + }, + { + "caption": "Expedia Group", + "image": "img/expedia_group_logo.png", + "infoLink": "https://www.expediagroup.com/", + "pinned": true + } + ], + "repoUrl": "https://github.com/ExpediaGroup/pitchfork" + }, + "onBrokenLinks": "log", + "onBrokenMarkdownLinks": "log", + "presets": [ + [ + "@docusaurus/preset-classic", + { + "docs": { + "homePageId": "about/introduction", + "showLastUpdateAuthor": true, + "showLastUpdateTime": true, + "path": "../docs", + "sidebarPath": "../website/sidebars.json" + }, + "blog": {}, + "theme": { + "customCss": "../src/css/customTheme.css" + } + } + ] + ], + "plugins": [], + "themeConfig": { + "navbar": { + "title": "Pitchfork", + "logo": { + "src": "img/pitchfork_devil.svg" + }, + "items": [ + { + "to": "docs/", + "label": "Docs", + "position": "left" + }, + { + "href": "https://github.com/ExpediaGroup/pitchfork", + "label": "GitHub", + "position": "left" + } + ] + }, + "image": "img/pitchfork_logo.svg", + "footer": { + "links": [], + "copyright": "Copyright © 2021 Expedia, Inc.", + "logo": { + "src": "img/pitchfork_devil.svg" + } + } + } +} \ No newline at end of file diff --git a/website/package.json b/website/package.json index 201aec87..c4ee23a1 100644 --- a/website/package.json +++ b/website/package.json @@ -1,16 +1,25 @@ { "scripts": { "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", + "start": "docusaurus start", + "build": "docusaurus build", "publish-gh-pages": "docusaurus-publish", "write-translations": "docusaurus-write-translations", "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" + "rename-version": "docusaurus-rename-version", + "swizzle": "docusaurus swizzle", + "deploy": "docusaurus deploy", + "docusaurus": "docusaurus" }, "devDependencies": { - "docusaurus": "^1.14.2", "minimist": "1.2.5", "kind-of": "6.0.3" + }, + "dependencies": { + "@docusaurus/core": "2.0.0-beta.3", + "@docusaurus/preset-classic": "2.0.0-beta.3", + "clsx": "^1.1.1", + "react": "^17.0.1", + "react-dom": "^17.0.1" } -} +} \ No newline at end of file diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100755 index 2b790e46..00000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,54 +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; - -function Help(props) { - const {config: siteConfig, language = ''} = props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const supportLinks = [ - { - content: `Learn more using the [documentation on this site.](${docUrl( - 'doc1.html', - )})`, - 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/pages/en/index.js b/website/pages/en/index.js deleted file mode 100755 index 686adcb1..00000000 --- a/website/pages/en/index.js +++ /dev/null @@ -1,141 +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; - -class HomeSplash extends React.Component { - render() { - const {siteConfig, language = ''} = this.props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const SplashContainer = props => ( -
-
-
{props.children}
-
-
- ); - - const Logo = props => ( -
- Project Logo -
- ); - - const ProjectTitle = () => ( -

- {siteConfig.title} - {siteConfig.tagline} -

- ); - - const PromoSection = props => ( -
-
-
{props.children}
-
-
- ); - - const Button = props => ( -
- - {props.children} - -
- ); - - return ( - - -
- - - - - -
-
- ); - } -} - -class Index extends React.Component { - render() { - const {config: siteConfig, language = ''} = this.props; - const {baseUrl} = siteConfig; - - const FeatureCallout = () => ( -
-

Features

-
-
    -
  • Lifts Zipkin tracing data into Haystack
  • -
  • Accepts Zipkin spans in json v1 and v2, thrift and protobuf
  • -
  • Supports different ingresses (HTTP, Kafka, and RabbitMQ)
  • -
  • Supports different outputs (Kafka, Kinesis, and Zipkin HTTP)
  • -
  • Allows logging of spans
  • -
  • Reports metrics to endpoints or/and to a Graphite collector
  • -
  • Exposes endpoints that can be used to test the app's health and to retrieve useful info
  • -
-
-
- ); - - const Showcase = () => { - if ((siteConfig.users || []).length === 0) { - return null; - } - - const showcase = siteConfig.users - .filter(user => user.pinned) - .map(user => ( - - {user.caption} - - )); - - const pageUrl = page => baseUrl + (language ? `${language}/` : '') + page; - - return ( -
-

Who is Using This?

-

This project is used by:

-
{showcase}
-
- - More {siteConfig.title} Users - -
-
- ); - }; - - return (
- -
-
-

Architecture

- -
- - -
-
- ); - } -} - -module.exports = Index; diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100755 index 039dc39f..00000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,48 +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; - -class Users extends React.Component { - render() { - const {config: siteConfig} = this.props; - if ((siteConfig.users || []).length === 0) { - return null; - } - - const editUrl = `${siteConfig.repoUrl}/edit/master/website/siteConfig.js`; - const showcase = siteConfig.users.map(user => ( - - {user.caption} - - )); - - return ( -
- -
-
-

Who is Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index 00ccd8b3..00000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,95 +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. - */ - -// See https://docusaurus.io/docs/site-config for all the possible -// site configuration options. - -// List of projects/orgs using your project for the users page. -const users = [ - { - caption: 'Hotels.com', - - image: 'img/hotels_logo.svg', - infoLink: 'https://www.hotels.com', - pinned: true, - }, - { - caption: 'Expedia Group', - - image: 'img/expedia_group_logo.png', - infoLink: 'https://www.expediagroup.com/', - pinned: true, - }, -]; - -const siteConfig = { - title: 'Pitchfork', // Title for your website. - tagline: 'Convert tracing data between Zipkin and Haystack formats', - - url: 'https://expediagroup.github.io', // Your website URL - baseUrl: '/pitchfork/', // Base URL for your project */ - - // Used for publishing and more - projectName: 'Pitchfork', - organizationName: 'ExpediaGroup', - - // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [ - { search: true }, - {doc: 'about/introduction', label: 'Docs'}, - {href: 'https://github.com/ExpediaGroup/pitchfork', label: 'GitHub'} - ], - - users, - - /* path to images for header/footer */ - headerIcon: 'img/pitchfork_devil.svg', - footerIcon: 'img/pitchfork_devil.svg', - favicon: 'img/pitchfork_devil.svg', - - /* Colors for website */ - colors: { - primaryColor: '#000099', - secondaryColor: '#01325A', - }, - - // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. - copyright: `Copyright © ${new Date().getFullYear()} Expedia, Inc.`, - - highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks. - theme: 'github', - }, - - // Add custom scripts here that would be placed in