Jack Humbert 3 лет назад
Родитель
Сommit
bb8c5cd54a

+ 13 - 14
docs/docusaurus.config.js

@@ -6,7 +6,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
 
 /** @type {import('@docusaurus/types').Config} */
 const config = {
-  title: 'My Site',
+  title: 'QMK',
   tagline: 'Dinosaurs are cool',
   favicon: 'img/favicon.ico',
 
@@ -53,14 +53,14 @@ const config = {
           // Please change this to your repo.
           // Remove this to remove the "edit this page" links.
           editUrl:
-            'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
+            'https://github.com/qmk/qmk_firmware/edit/master/docs/',
         },
         // blog: {
         //   showReadingTime: true,
         //   // Please change this to your repo.
         //   // Remove this to remove the "edit this page" links.
         //   editUrl:
-        //     'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
+        //     'https://github.com/qmk/qmk_firmware/edit/master/docs/',
         // },
         theme: {
           customCss: require.resolve('./src/css/custom.css'),
@@ -75,21 +75,20 @@ const config = {
       // Replace with your project's social card
       image: 'img/docusaurus-social-card.jpg',
       navbar: {
-        title: 'My Site',
+        title: 'QMK Firmware Docs',
         logo: {
           alt: 'My Site Logo',
           src: 'img/logo.svg',
         },
-        items: [
+        items: [            
+          // {
+          //   type: 'docSidebar',
+          //   sidebarId: 'summary',
+          //   position: 'left',
+          //   label: 'Summary',
+          // },
           {
-            type: 'docSidebar',
-            sidebarId: 'tutorialSidebar',
-            position: 'left',
-            label: 'Tutorial',
-          },
-          {to: '/blog', label: 'Blog', position: 'left'},
-          {
-            href: 'https://github.com/facebook/docusaurus',
+            href: 'https://github.com/qmk/qmk_firmware',
             label: 'GitHub',
             position: 'right',
           },
@@ -138,7 +137,7 @@ const config = {
             ],
           },
         ],
-        copyright: `Copyright © ${new Date().getFullYear()} QMK, Inc. Built with Docusaurus.`,
+        copyright: `Copyright © ${new Date().getFullYear()} QMK. Built with Docusaurus.`,
       },
       prism: {
         theme: lightCodeTheme,

BIN
docs/gitbook/images/favicon.ico


BIN
docs/gitbook/images/favicon.png


+ 1 - 2
docs/newbs.md

@@ -6,9 +6,8 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
 
 Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](https://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.
 
-:::note
+:::tip Is This Guide For Me?
 
- **Is This Guide For Me?**<br />
 If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.
 
 :::

+ 208 - 15
docs/sidebars.js

@@ -13,21 +13,214 @@
 
 /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
 const sidebars = {
-  // By default, Docusaurus generates a sidebar from the docs folder structure
-  tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
-
-  // But you can create a sidebar manually
-  /*
-  tutorialSidebar: [
-    'intro',
-    'hello',
-    {
-      type: 'category',
-      label: 'Tutorial',
-      items: ['tutorial-basics/create-a-document'],
-    },
-  ],
-   */
+    // By default, Docusaurus generates a sidebar from the docs folder structure
+    summary: [
+        {
+            type: "doc",
+            id: "README",
+            label: "About QMK",
+        },
+        {
+            type: "category",
+            label: "Tutorial",
+            link: {
+                type: "doc",
+                id: "newbs",
+            },
+            items: [
+                // "newbs",
+                "newbs_getting_started",
+                "newbs_building_firmware",
+                "newbs_flashing",
+                "support",
+                "newbs_building_firmware_workflow",
+                "newbs_learn_more_resources",
+                "syllabus",
+            ],
+        },
+        {
+            type: "category",
+            label: "FAQs",
+            link: {
+                type: "doc",
+                id: "faq_general",
+            },
+            items: [
+                // "faq_general",
+                "faq_build",
+                "faq_misc",
+                "faq_debug",
+                "faq_keymap",
+                "squeezing_avr",
+                "reference_glossary",
+            ],
+        },
+        {
+            type: "category",
+            label: "Configurator",
+            link: {
+                type: "doc",
+                id: "newbs_building_firmware_configurator",
+            },
+            items: [
+                // "newbs_building_firmware_configurator",
+                "configurator_step_by_step",
+                "configurator_troubleshooting",
+                "configurator_architecture",
+                {
+                    type: "category",
+                    label: "QMK API",
+                    link: {
+                        type: "doc",
+                        id: "api_overview",
+                    },
+                    items: [
+                        // "api_overview",
+                        "api_docs",
+                        "reference_configurator_support",
+                        "configurator_default_keymaps",
+                    ],
+                },
+            ],
+        },
+        {
+            type: "category",
+            label: "CLI",
+            link: {
+                type: "doc",
+                id: "cli",
+            },
+            items: [
+                // "cli",
+                "cli_configuration",
+                "cli_commands",
+                "cli_tab_complete",
+            ],
+        },
+        {
+            type: "category",
+            label: "Using QMK",
+            items: [
+                {
+                    Guides: [
+                        "custom_quantum_functions",
+                        "driver_installation_zadig",
+                        "keymap",
+                        {
+                            "Development Environments": [
+                                "getting_started_docker",
+                                "getting_started_vagrant",
+                            ],
+                        },
+                        {
+                            Flashing: ["flashing", "flashing_bootloadhid"],
+                            IDEs: ["other_eclipse", "other_vscode"],
+                            "Git Best Practices": [
+                                "newbs_git_best_practices",
+                                "newbs_git_using_your_master_branch",
+                                "newbs_git_resolving_merge_conflicts",
+                                "newbs_git_resynchronize_a_branch",
+                            ],
+                        },
+                    ],
+                },
+                {
+                    "Simple Keycodes": [
+                        "keycodes",
+                        "keycodes_basic",
+                        "reference_keymap_extras",
+                        "feature_advanced_keycodes",
+                        "quantum_keycodes",
+                        "keycodes_magic",
+                    ],
+                },
+                {
+                    "Advanced Keycodes": [
+                        "feature_command",
+                        "feature_dynamic_macros",
+                        "feature_grave_esc",
+                        "feature_leader_key",
+                        "mod_tap",
+                        "feature_macros",
+                        "feature_mouse_keys",
+                        "feature_programmable_button",
+                        "feature_space_cadet",
+                        "keycodes_us_ansi_shifted",
+                    ],
+                },
+                {
+                    "Software Features": [
+                        "feature_auto_shift",
+                        "feature_autocorrect",
+                        "feature_caps_word",
+                        "feature_combo",
+                        "feature_debounce_type",
+                        "feature_eeprom",
+                        "feature_key_lock",
+                        "feature_key_overrides",
+                        "feature_layers",
+                        "one_shot_keys",
+                        "feature_os_detection",
+                        "feature_rawhid",
+                        "feature_secure",
+                        "feature_send_string",
+                        "feature_sequencer",
+                        "feature_swap_hands",
+                        "feature_tap_dance",
+                        "tap_hold",
+                        "feature_tri_layer",
+                        "feature_unicode",
+                        "feature_userspace",
+                        "feature_wpm",
+                    ],
+                },
+                {
+                    "Hardware Features": [
+                        {
+                            Displays: [
+                                "quantum_painter",
+                                "quantum_painter_lvgl",
+                                "feature_hd44780",
+                                "feature_st7565",
+                                "feature_oled_driver",
+                            ],
+                            Lighting: [
+                                "feature_backlight",
+                                "feature_led_matrix",
+                                "feature_rgblight",
+                                "feature_rgb_matrix",
+                            ],
+                        },
+                        "feature_audio",
+                        "feature_bluetooth",
+                        "feature_bootmagic",
+                        "feature_converters",
+                        "custom_matrix",
+                        "feature_digitizer",
+                        "feature_dip_switch",
+                        "feature_encoders",
+                        "feature_haptic_feedback",
+                        "feature_joystick",
+                        "feature_led_indicators",
+                        "feature_midi",
+                        "feature_pointing_device",
+                        "feature_ps2_mouse",
+                        "feature_split_keyboard",
+                        "feature_stenography",
+                        "feature_velocikey",
+                    ],
+                },
+                {
+                    "Keyboard Building": [
+                        "easy_maker",
+                        "porting_your_keyboard_to_qmk",
+                        "hand_wire",
+                        "isp_flashing_guide",
+                    ],
+                },
+            ],
+        },
+    ],
 };
 
 module.exports = sidebars;

+ 0 - 64
docs/src/components/HomepageFeatures/index.js

@@ -1,64 +0,0 @@
-import React from 'react';
-import clsx from 'clsx';
-import styles from './styles.module.css';
-
-const FeatureList = [
-  {
-    title: 'Easy to Use',
-    Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
-    description: (
-      <>
-        Docusaurus was designed from the ground up to be easily installed and
-        used to get your website up and running quickly.
-      </>
-    ),
-  },
-  {
-    title: 'Focus on What Matters',
-    Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
-    description: (
-      <>
-        Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
-        ahead and move your docs into the <code>docs</code> directory.
-      </>
-    ),
-  },
-  {
-    title: 'Powered by React',
-    Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
-    description: (
-      <>
-        Extend or customize your website layout by reusing React. Docusaurus can
-        be extended while reusing the same header and footer.
-      </>
-    ),
-  },
-];
-
-function Feature({Svg, title, description}) {
-  return (
-    <div className={clsx('col col--4')}>
-      <div className="text--center">
-        <Svg className={styles.featureSvg} role="img" />
-      </div>
-      <div className="text--center padding-horiz--md">
-        <h3>{title}</h3>
-        <p>{description}</p>
-      </div>
-    </div>
-  );
-}
-
-export default function HomepageFeatures() {
-  return (
-    <section className={styles.features}>
-      <div className="container">
-        <div className="row">
-          {FeatureList.map((props, idx) => (
-            <Feature key={idx} {...props} />
-          ))}
-        </div>
-      </div>
-    </section>
-  );
-}

+ 0 - 11
docs/src/components/HomepageFeatures/styles.module.css

@@ -1,11 +0,0 @@
-.features {
-  display: flex;
-  align-items: center;
-  padding: 2rem 0;
-  width: 100%;
-}
-
-.featureSvg {
-  height: 200px;
-  width: 200px;
-}

+ 0 - 41
docs/src/pages/index.js

@@ -1,41 +0,0 @@
-import React from 'react';
-import clsx from 'clsx';
-import Link from '@docusaurus/Link';
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
-import Layout from '@theme/Layout';
-import HomepageFeatures from '@site/src/components/HomepageFeatures';
-
-import styles from './index.module.css';
-
-function HomepageHeader() {
-  const {siteConfig} = useDocusaurusContext();
-  return (
-    <header className={clsx('hero hero--primary', styles.heroBanner)}>
-      <div className="container">
-        <h1 className="hero__title">{siteConfig.title}</h1>
-        <p className="hero__subtitle">{siteConfig.tagline}</p>
-        <div className={styles.buttons}>
-          <Link
-            className="button button--secondary button--lg"
-            to="/docs/intro">
-            Docusaurus Tutorial - 5min ⏱️
-          </Link>
-        </div>
-      </div>
-    </header>
-  );
-}
-
-export default function Home() {
-  const {siteConfig} = useDocusaurusContext();
-  return (
-    <Layout
-      title={`Hello from ${siteConfig.title}`}
-      description="Description will go into a meta tag in <head />">
-      <HomepageHeader />
-      <main>
-        <HomepageFeatures />
-      </main>
-    </Layout>
-  );
-}

+ 0 - 7
docs/src/pages/markdown-page.md

@@ -1,7 +0,0 @@
----
-title: Markdown page example
----
-
-# Markdown page example
-
-You don't need React to write simple standalone pages.

BIN
docs/static/img/favicon.ico


+ 0 - 41
docs/test/README.md

@@ -1,41 +0,0 @@
-# Website
-
-This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
-
-### Installation
-
-```
-$ yarn
-```
-
-### Local Development
-
-```
-$ yarn start
-```
-
-This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
-
-### Build
-
-```
-$ yarn build
-```
-
-This command generates static content into the `build` directory and can be served using any static contents hosting service.
-
-### Deployment
-
-Using SSH:
-
-```
-$ USE_SSH=true yarn deploy
-```
-
-Not using SSH:
-
-```
-$ GIT_USER=<Your GitHub username> yarn deploy
-```
-
-If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.