Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration docusaurus 2 #429

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
16 changes: 16 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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*
112 changes: 0 additions & 112 deletions website/core/Footer.js

This file was deleted.

129 changes: 129 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/**

Choose a reason for hiding this comment

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

Please use 2 spaces (at the most, 4) for indentation. Recommend you install the Prettier plugin for your editor.

* 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

Choose a reason for hiding this comment

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

Suggested change
// See https://docusaurus.io/docs/site-config for all the possible

// site configuration options.

const siteConfig = {
title: "Redex", // Title for your website.
tagline: "An Android Bytecode Optimizer",
url: "https://fbredex.com",
baseUrl: "/",

// Used for publishing and more
organizationName: "facebook",
projectName: "redex",

favicon: "img/favicon.png",

/* Colors for website */
// colors: {
// primaryColor: '#75c7a4',
// secondaryColor: '#f9f9f9',
// },

/* Custom fonts for website */
/*
fonts: {

Choose a reason for hiding this comment

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

delete it. why make it commented when its unused

myFont: [
"Times New Roman",
"Serif"
],
myOtherFont: [
"-apple-system",
"system-ui"
]
},
*/

// highlight: {
// // Highlight.js theme to use for syntax highlighting in code blocks.
// theme: "default"
// },

// Add custom scripts here that would be placed in <script> tags.
scripts: ["https://buttons.github.io/buttons.js"],

Choose a reason for hiding this comment

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

i dont think its needed now

Copy link
Author

Choose a reason for hiding this comment

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

So github stars won't be coming,in v1 it was present in footer https://fbredex.com/

Choose a reason for hiding this comment

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

Yep we don't plan to show it in the footer anymore. You may ignore that.


// You may provide arbitrary config keys to be used as needed by your
// template. For example, if you need your repo's URL...
// repoUrl: "https://github.com/facebook/redex",
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
// docs folder path relative to website dir.
path: "../docs",
// sidebars file relative to website dir.
sidebarPath: require.resolve("./sidebars.json"),
// Equivalent to `enableUpdateBy`.
showLastUpdateAuthor: true,
// Equivalent to `enableUpdateTime`.
showLastUpdateTime: true
},
theme: {
customCss: require.resolve("./src/css/custom.css")
}
}
]
],
themeConfig: {
navbar: {
title: "Redex",
logo: {
alt: "Redex Logo",
src: "img/favicon.png"
},
links: [
{ to: "docs/installation", label: "Docs", position: "right" },
{ to: "docs/faq", label: "FAQ", position: "right" },
// {to: 'blog', label: 'Blog'}, // put back when we create a blog folder and add our first blog
{
href:
"https://code.facebook.com/posts/1480969635539475/optimizing-android-bytecode-with-redex",
label: "Birth",
position: "right"
}
]
},
footer: {
style:'dark',
logo: {
alt: "Facebook Open Source Logo",
src: "img/oss_logo.png"
},
links:[
{
title:'Docs',
items:[
{
label:'Getting Started',
to:"docs/installation"
},
{
label:'Configuring',
to:"docs/configuring"
},
{
label:'Using',
to:"docs/usage"
},
{
label:'FAQ',
to:"docs/faq"
}
]
}
],
// This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
copyright: `Copyright © ${new Date().getFullYear()} Facebook Inc.`
},
image: "img/og_image.png"
}
};

module.exports = siteConfig;
23 changes: 15 additions & 8 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
"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"
"examples": "docusaurus examples",

Choose a reason for hiding this comment

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

Suggested change
"examples": "docusaurus examples",

"start": "docusaurus start",
"build": "docusaurus build",
"publish-gh-pages": "docusaurus publish",

Choose a reason for hiding this comment

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

Suggested change
"publish-gh-pages": "docusaurus publish",

"write-translations": "docusaurus write-translations",

Choose a reason for hiding this comment

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

Suggested change
"write-translations": "docusaurus write-translations",

"version": "docusaurus version",

Choose a reason for hiding this comment

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

Suggested change
"version": "docusaurus version",

"rename-version": "docusaurus rename-version",

Choose a reason for hiding this comment

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

Suggested change
"rename-version": "docusaurus rename-version",

"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"

},
"devDependencies": {
"docusaurus": "^1.7.2"
"@docusaurus/core": "^2.0.0-alpha.27",
"@docusaurus/preset-classic": "^2.0.0-alpha.27",
Copy link

Choose a reason for hiding this comment

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

@ThakurKarthik can you please update Docusaurus to the latest version?

Copy link
Author

Choose a reason for hiding this comment

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

I have updated them to newer 2.0.0-alpha.34 version

"classnames": "^2.2.6",
"react": "^16.8.4",
"react-dom": "^16.8.4"
}
}
54 changes: 0 additions & 54 deletions website/pages/en/faq.js

This file was deleted.

Loading