From dc1948a82540b74c98e1c62907d77e396c9f139e Mon Sep 17 00:00:00 2001 From: Robin Raju Date: Fri, 24 Jul 2020 14:55:39 +0200 Subject: [PATCH 1/8] Create and configure Docusaurus documentation --- .gitignore | 12 + docs/delinearize.md | 7 + docs/exampledoc4.md | 6 + docs/exampledoc5.md | 6 + docs/getting_started.md | 7 + docs/install.md | 7 + docs/linearize.md | 7 + docs/mainadm.md | 7 + docs/studentify.md | 7 + website/blog/2020-07-17-new-version-1.0.0.md | 52 +++++ website/core/Footer.js | 77 +++++++ website/package.json | 14 ++ website/pages/en/help.js | 54 +++++ website/pages/en/index.js | 212 ++++++++++++++++++ website/pages/en/users.js | 48 ++++ website/sidebars.json | 12 + website/siteConfig.js | 96 ++++++++ website/static/css/custom.css | 23 ++ website/static/img/favicon.ico | Bin 0 -> 766 bytes website/static/img/oss_logo.png | Bin 0 -> 4370 bytes website/static/img/undraw_code_review.svg | 1 + website/static/img/undraw_monitor.svg | 1 + website/static/img/undraw_note_list.svg | 1 + website/static/img/undraw_online.svg | 1 + website/static/img/undraw_open_source.svg | 1 + .../static/img/undraw_operating_system.svg | 1 + website/static/img/undraw_react.svg | 1 + website/static/img/undraw_tweetstorm.svg | 1 + .../static/img/undraw_youtube_tutorial.svg | 1 + 29 files changed, 663 insertions(+) create mode 100644 docs/delinearize.md create mode 100644 docs/exampledoc4.md create mode 100644 docs/exampledoc5.md create mode 100644 docs/getting_started.md create mode 100644 docs/install.md create mode 100644 docs/linearize.md create mode 100644 docs/mainadm.md create mode 100644 docs/studentify.md create mode 100644 website/blog/2020-07-17-new-version-1.0.0.md create mode 100644 website/core/Footer.js create mode 100644 website/package.json create mode 100644 website/pages/en/help.js create mode 100644 website/pages/en/index.js create mode 100644 website/pages/en/users.js create mode 100644 website/sidebars.json create mode 100644 website/siteConfig.js create mode 100644 website/static/css/custom.css create mode 100644 website/static/img/favicon.ico create mode 100644 website/static/img/oss_logo.png create mode 100644 website/static/img/undraw_code_review.svg create mode 100644 website/static/img/undraw_monitor.svg create mode 100644 website/static/img/undraw_note_list.svg create mode 100644 website/static/img/undraw_online.svg create mode 100644 website/static/img/undraw_open_source.svg create mode 100644 website/static/img/undraw_operating_system.svg create mode 100644 website/static/img/undraw_react.svg create mode 100644 website/static/img/undraw_tweetstorm.svg create mode 100644 website/static/img/undraw_youtube_tutorial.svg diff --git a/.gitignore b/.gitignore index 84975854..0a68048f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,15 @@ out/ # Play logs/ + +# Docusaurus +node_modules + +lib/core/metadata.js +lib/core/MetadataBlog.js + +website/translated_docs +website/build/ +website/yarn.lock +website/node_modules +website/i18n/* diff --git a/docs/delinearize.md b/docs/delinearize.md new file mode 100644 index 00000000..758e9e0b --- /dev/null +++ b/docs/delinearize.md @@ -0,0 +1,7 @@ +--- +id: delinearize +title: The delinearize command +sidebar_label: delinearize +--- + +# Sub Title \ No newline at end of file diff --git a/docs/exampledoc4.md b/docs/exampledoc4.md new file mode 100644 index 00000000..6f94ffe9 --- /dev/null +++ b/docs/exampledoc4.md @@ -0,0 +1,6 @@ +--- +id: doc4 +title: Other Document +--- + +this is another document diff --git a/docs/exampledoc5.md b/docs/exampledoc5.md new file mode 100644 index 00000000..92e2d0d5 --- /dev/null +++ b/docs/exampledoc5.md @@ -0,0 +1,6 @@ +--- +id: doc5 +title: Fifth Document +--- + +Another one diff --git a/docs/getting_started.md b/docs/getting_started.md new file mode 100644 index 00000000..0ca3ab60 --- /dev/null +++ b/docs/getting_started.md @@ -0,0 +1,7 @@ +--- +id: getting_started +title: Getting Started +sidebar_label: Introduction +--- + +# Introduction diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 00000000..8c336fe3 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,7 @@ +--- +id: install +title: Installing Course Management Tools +sidebar_label: Installation +--- + +# Sub Title \ No newline at end of file diff --git a/docs/linearize.md b/docs/linearize.md new file mode 100644 index 00000000..eb0986ea --- /dev/null +++ b/docs/linearize.md @@ -0,0 +1,7 @@ +--- +id: linearize +title: The linearize command +sidebar_label: linearize +--- + +# Sub Title \ No newline at end of file diff --git a/docs/mainadm.md b/docs/mainadm.md new file mode 100644 index 00000000..23fc8c60 --- /dev/null +++ b/docs/mainadm.md @@ -0,0 +1,7 @@ +--- +id: mainadm +title: The mainadm command +sidebar_label: mainadm +--- + +# Sub Title \ No newline at end of file diff --git a/docs/studentify.md b/docs/studentify.md new file mode 100644 index 00000000..0ec3f6b4 --- /dev/null +++ b/docs/studentify.md @@ -0,0 +1,7 @@ +--- +id: studentify +title: The studentify command +sidebar_label: studentify +--- + +# Sub Title \ No newline at end of file diff --git a/website/blog/2020-07-17-new-version-1.0.0.md b/website/blog/2020-07-17-new-version-1.0.0.md new file mode 100644 index 00000000..3d64b3cc --- /dev/null +++ b/website/blog/2020-07-17-new-version-1.0.0.md @@ -0,0 +1,52 @@ +--- +title: Hello world! new release 1.0.0 +author: Robin Raju +authorURL: http://twitter.com/rbn_raj +authorImageURL: https://avatars2.githubusercontent.com/u/8011082?v=4 +--- + +## Course Management Tools - 1.0.0 🎉 +This is the initial release of `Course Management Tools`, a set of command line tools to build and maintain training courses. +The packaged applications are: +- cmt-delinearize +- cmt-linearize +- cmt-mainadm +- cmt-studentify + +### Notable Changes +- Simple Installation +- Support for Scala 3 (Dotty), +- Play Framework support added + +### How To Install +- Download and unzip `course-management-tools.zip` +- Update system `PATH` to `course-management-tools/bin` 🚀 + +You may easily update your `PATH` using the following commands + +If you are using `zsh` +``` +echo -n 'export PATH=$PATH:[path to course-management-tools/bin]' >> ~/.zshrc +``` +or if you are using `bash` +``` +echo -n 'export PATH=$PATH:[path to course-management-tools/bin]' >> ~/.bash_profile +``` + +### Contributors + +`git shortlog -sn --no-merges 5a894d9..1.0.0` + +``` + 91 Eric Loots + 9 Robin Raju + 7 Wade Waldron + 1 Ignasi Marimon-Clos + 1 Ryan Case + 1 Sezer Akar + 1 Yury Gribkov + 1 Craig Pottinger + 1 patricenys + 1 Enno + 1 Eugene Yokota +``` diff --git a/website/core/Footer.js b/website/core/Footer.js new file mode 100644 index 00000000..c6f50926 --- /dev/null +++ b/website/core/Footer.js @@ -0,0 +1,77 @@ +/** + * 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; + const docsUrl = this.props.config.docsUrl; + const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; + const langPart = `${language ? `${language}/` : ''}`; + return `${baseUrl}${docsPart}${langPart}${doc}`; + } + + pageUrl(doc, language) { + const baseUrl = this.props.config.baseUrl; + return baseUrl + (language ? `${language}/` : '') + doc; + } + + render() { + return ( + + ); + } +} + +module.exports = Footer; diff --git a/website/package.json b/website/package.json new file mode 100644 index 00000000..1f87392a --- /dev/null +++ b/website/package.json @@ -0,0 +1,14 @@ +{ + "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.14.4" + } +} diff --git a/website/pages/en/help.js b/website/pages/en/help.js new file mode 100644 index 00000000..2b790e46 --- /dev/null +++ b/website/pages/en/help.js @@ -0,0 +1,54 @@ +/** + * 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 new file mode 100644 index 00000000..1e03b771 --- /dev/null +++ b/website/pages/en/index.js @@ -0,0 +1,212 @@ +/** + * 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 MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ +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 = props => ( +

+ {props.title} + {props.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 Block = props => ( + + + + ); + + const FeatureCallout = () => ( +
+

Feature Callout

+ These are features of this project +
+ ); + + const TryOut = () => ( + + {[ + { + content: + 'To make your landing page more attractive, use illustrations! Check out ' + + '[**unDraw**](https://undraw.co/) which provides you with customizable illustrations which are free to use. ' + + 'The illustrations you see on this page are from unDraw.', + image: `${baseUrl}img/undraw_code_review.svg`, + imageAlign: 'left', + title: 'Wonderful SVG Illustrations', + }, + ]} + + ); + + const Description = () => ( + + {[ + { + content: + 'This is another description of how this project is useful', + image: `${baseUrl}img/undraw_note_list.svg`, + imageAlign: 'right', + title: 'Description', + }, + ]} + + ); + + const LearnHow = () => ( + + {[ + { + content: + 'Each new Docusaurus project has **randomly-generated** theme colors.', + image: `${baseUrl}img/undraw_youtube_tutorial.svg`, + imageAlign: 'right', + title: 'Randomly Generated Theme Colors', + }, + ]} + + ); + + const Features = () => ( + + {[ + { + content: 'This is the content of my feature', + image: `${baseUrl}img/undraw_react.svg`, + imageAlign: 'top', + title: 'Feature One', + }, + { + content: 'The content of my second feature', + image: `${baseUrl}img/undraw_operating_system.svg`, + imageAlign: 'top', + title: 'Feature Two', + }, + ]} + + ); + + 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 all these people

+
{showcase}
+
+ + More {siteConfig.title} Users + +
+
+ ); + }; + + return ( +
+ +
+ + + + + + +
+
+ ); + } +} + +module.exports = Index; diff --git a/website/pages/en/users.js b/website/pages/en/users.js new file mode 100644 index 00000000..039dc39f --- /dev/null +++ b/website/pages/en/users.js @@ -0,0 +1,48 @@ +/** + * 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/sidebars.json b/website/sidebars.json new file mode 100644 index 00000000..313c28c4 --- /dev/null +++ b/website/sidebars.json @@ -0,0 +1,12 @@ +{ + "docs": { + "Getting Started": ["getting_started", "install"], + "Mainadm": ["mainadm"], + "Linearize": ["linearize"], + "Delinearize": ["delinearize"], + "Studentify": ["studentify"] + }, + "docs-other": { + "First Category": ["doc4", "doc5"] + } +} diff --git a/website/siteConfig.js b/website/siteConfig.js new file mode 100644 index 00000000..d75504e1 --- /dev/null +++ b/website/siteConfig.js @@ -0,0 +1,96 @@ +// See https://docusaurus.io/docs/site-config for all the possible +// site configuration options. + +const repoUrl = 'https://github.com/eloots/course-management-tools' +// List of projects/orgs using your project for the users page. +const users = [ + { + caption: 'User1', + // You will need to prepend the image path with your baseUrl + // if it is not '/', like: '/test-site/img/image.jpg'. + image: '/img/undraw_open_source.svg', + infoLink: 'https://www.facebook.com', + pinned: true, + }, +]; + +const siteConfig = { + title: 'Course Management Tools', + tagline: 'A set of command line tools to build and maintain training courses.', + url: 'https://eloots.github.io', + baseUrl: '/course-management-tools/', + + // Used for publishing and more + projectName: 'course-management-tools', + organizationName: 'eloots', + + headerLinks: [ + {doc: 'getting_started', label: 'Docs'}, + { href: repoUrl, label: "GitHub", external: true }, + {blog: true, label: 'Blog'}, + ], + + // If you have users set above, you add it here: + users, + + /* path to images for header/footer */ + headerIcon: 'img/favicon.ico', + footerIcon: 'img/favicon.ico', + favicon: 'img/favicon.ico', + + /* Colors for website */ + colors: { + primaryColor: '#c71c28', + secondaryColor: '#8c1018', + }, + + /* Custom fonts for website */ + /* + fonts: { + myFont: [ + "Times New Roman", + "Serif" + ], + myOtherFont: [ + "-apple-system", + "system-ui" + ] + }, + */ + + // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. + copyright: `Copyright © ${new Date().getFullYear()} Course Management Tools`, + + highlight: { + // Highlight.js theme to use for syntax highlighting in code blocks. + theme: 'github', + }, + + // Add custom scripts here that would be placed in