chore(docs): add docs workspace basic files

This commit is contained in:
Maribeth Moffatt
2026-01-21 10:12:05 -05:00
parent 27b4d8624b
commit 5b22be3d78
6 changed files with 19232 additions and 1748 deletions
+18861 -1748
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
# Autogenerated reference docs, do not check in
docs/docs/reference/*
.docusaurus
+8
View File
@@ -0,0 +1,8 @@
# Docs
# TODO: Format handwritten docs but not api reference docs
docs/*
docs/reference
# misc
node_modules/*
CHANGELOG.md
+41
View File
@@ -0,0 +1,41 @@
# Blockly Documentation Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
## Installation
Run `npm install` at the root of the blockly repo, then all other commands from the `packages/docs` directory.
```bash
npm install
cd packages/docs
```
## Local Development
```bash
npm 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
```bash
npm run build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Test your production build locally
```bash
npm run serve
```
The build folder is now served at http://localhost:3000/.
## Deployment
TODO
+258
View File
@@ -0,0 +1,258 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import { themes as prismThemes } from 'prism-react-renderer';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Blockly Docs',
favicon: 'img/logo.svg',
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
},
// Set the production url of your site here
url: 'https://joe-davis-blockly.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/blockly/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'Joe-Davis-Blockly', // Usually your GitHub org/user name.
projectName: 'blockly', // Usually your repo name.
onBrokenLinks: 'warn',
//onBrokenMarkdownLinks: 'warn',
markdown: {
format: 'detect',
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
fromExtensions: ['md', 'mdx'],
},
]
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: './sidebars.js',
showLastUpdateTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/Joe-Davis-Blockly/blockly/tree/cybage-blockly/docs',
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
// Will be passed to @docusaurus/plugin-google-tag-manager (only enabled when explicitly specified)
googleTagManager: {
containerId: 'GTM-NSSCB6XT',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'images/blockly_banner.png',
navbar: {
title: 'Blockly',
logo: {
alt: 'Blockly Logo',
src: 'img/logo.svg',
srcDark: 'img/blockly-dark-theme-logo.png',
},
items: [
{
type: 'dropdown',
label: 'Guides',
position: 'left',
items: [
{
label: 'Get started',
to: 'guides/get-started/what-is-blockly',
},
{
label: 'Design considerations',
to: 'guides/design/app-overview',
},
{
label: 'Programming considerations',
to: 'guides/programming/using_blockly_apis',
},
{
label: 'Build your editor',
to: 'guides/configure/web/configuration_struct',
},
{
label: 'Build your blocks',
to: 'guides/create-custom-blocks/overview',
},
{
label: 'Build your application',
to: 'guides/app-integration/run-code',
},
{
label: 'Contribute to Blockly',
to: 'guides/contribute/index',
},
],
},
{
type: 'docSidebar',
label: 'Reference',
sidebarId: 'referenceSidebar',
position: 'left',
},
{
type: 'docSidebar',
label: 'Codelabs',
sidebarId: 'tutorialSidebar',
position: 'left',
},
{
label: 'Samples',
href: 'https://raspberrypifoundation.github.io/blockly-samples/',
position: 'right',
},
{
label: 'GitHub',
href: 'https://github.com/raspberrypifoundation/blockly',
position: 'right',
},
],
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'typescript'],
},
algolia: {
appId: "JOPASJ603L",
apiKey: "9a6e9f24a807a1571990048ef66c9438", // safe to expose
indexName: "Docusaurus_Website",
contextualSearch: true,
searchParameters: {},
searchPagePath: "search",
askAi: {
indexName: 'markdown-index',
apiKey: '9a6e9f24a807a1571990048ef66c9438',
appId: 'JOPASJ603L',
assistantId: '0JvuvoDNFavC',
},
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
footer: {
copyright: 'Blockly is an open source project of the Raspberry Pi Foundation, a UK registered charity (1129409), supported by Google.',
links: [
{
title: 'Docs',
items: [
{
label: 'Guides',
to: '/blockly/guides/get-started/what-is-blockly',
},
{
label: 'Reference',
to: '/blockly/reference/js/blockly',
},
],
},
{
title: 'Learn',
items: [
{
label: 'Codelabs',
to: '/blockly/codelabs/index',
},
{
label: 'Samples and Demos',
to: 'https://raspberrypifoundation.github.io/blockly-samples/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Community Forum',
to: 'https://groups.google.com/g/blockly',
},
{
label: 'Blockly Summit',
to: 'http://www.blocklysummit.com',
},
{
label: 'YouTube',
to: 'https://www.youtube.com/@blocklydev',
},
{
label: 'Report Issue',
to: 'https://github.com/RaspberryPiFoundation/blockly/issues',
},
],
},
{
title: 'About',
items: [
{
label: 'Team',
to: 'http://blockly.com/team',
},
{
label: 'Contact',
to: 'mailto:support@blockly.com',
},
{
label: 'Privacy',
to: 'https://www.raspberrypi.org/privacy/',
},
{
label: 'Cookies',
to: 'https://www.raspberrypi.org/cookies/',
},
],
},
]
},
}),
};
export default config;
+60
View File
@@ -0,0 +1,60 @@
{
"name": "blockly-docs",
"version": "0.0.0",
"private": true,
"description": "Blockly documentation site",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.9.2",
"@docusaurus/plugin-client-redirects": "^3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"js-yaml": "^4.1.0",
"prism-react-renderer": "^2.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"remark-directive": "^4.0.0"
},
"devDependencies": {
"@docsearch/core": "^4.5.2",
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/types": "3.9.2",
"gh-pages": "^6.3.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=20.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RaspberryPiFoundation/blockly.git"
},
"author": "Raspberry Pi Foundation",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/RaspberryPiFoundation/blockly/issues"
},
"homepage": "https://github.com/RaspberryPiFoundation/blockly#readme"
}