Skip to content

Commit af1dd7d

Browse files
author
Tommy Lillehagen
committed
Upgrade docusaurus to v3 and refresh design
1 parent 4f2458a commit af1dd7d

33 files changed

+8075
-5292
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ node_modules
2020
i18n/*
2121
package-lock.json
2222
yarn-error.log
23+
.docusaurus
2324
!i18n/en.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The hacklang.org landing page content
22

3-
This directory contains the landing page and other documentation for [hacklang.org](http://hacklang.org). It contains links to the [Hack user documentation over at docs.hhvm.com](http://docs.hhvm.com/hack) and other relevant places. [hacklang.org](http://hacklang.org) is hosted on GitHub pages.
3+
This directory contains the landing page and other documentation for [hacklang.org](http://hacklang.org). It contains links to the [Hack user documentation over at docs.hhvm.com](http://docs.hhvm.com/hack) and other relevant places. [hacklang.org](http://hacklang.org) is hosted on GitHub Pages.
44

55
## Contributing
66

core/Footer.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

docs/home.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Hack

docusaurus.config.js

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/**
2+
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
3+
*/
4+
5+
/* eslint-disable */
6+
7+
const lightCodeTheme = require('prism-react-renderer').themes.github;
8+
9+
// With JSDoc @type annotations, IDEs can provide config autocompletion
10+
/** @type {import('@docusaurus/types').DocusaurusConfig} */
11+
(module.exports = {
12+
title: 'Hack',
13+
url: 'https://hacklang.org',
14+
baseUrl: process.env.DOCUSAURUS_BASE_URL || '/',
15+
onBrokenLinks: 'warn',
16+
trailingSlash: true,
17+
favicon: 'img/favicon.ico',
18+
organizationName: 'hhvm',
19+
projectName: 'hacklang.org',
20+
markdown: {
21+
hooks: {
22+
onBrokenMarkdownLinks: 'warn',
23+
onBrokenMarkdownImages: 'throw',
24+
},
25+
anchors: {
26+
maintainCase: false,
27+
},
28+
},
29+
presets: [
30+
[
31+
'@docusaurus/preset-classic',
32+
{
33+
docs: {
34+
sidebarPath: './sidebars.js',
35+
},
36+
theme: {
37+
customCss: ['./src/css/custom.css'],
38+
},
39+
},
40+
],
41+
],
42+
themeConfig:
43+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
44+
({
45+
colorMode: {
46+
disableSwitch: true,
47+
respectPrefersColorScheme: false,
48+
},
49+
navbar: {
50+
title: 'Hack',
51+
logo: {
52+
alt: 'Hack Logo',
53+
src: 'img/hack.svg',
54+
},
55+
items: [
56+
{
57+
href: 'https://docs.hhvm.com/',
58+
position: 'right',
59+
label: 'Docs',
60+
},
61+
{
62+
href: 'https://github.com/facebook/hhvm/tree/master/hphp/hack',
63+
position: 'right',
64+
label: 'GitHub',
65+
},
66+
{
67+
href: 'https://twitter.com/hacklang',
68+
position: 'right',
69+
label: 'Twitter',
70+
},
71+
{
72+
href: 'https://hhvm.com/',
73+
position: 'right',
74+
label: 'HHVM',
75+
},
76+
{
77+
href: 'https://hhvm.com/blog',
78+
position: 'right',
79+
label: 'Blog',
80+
},
81+
],
82+
},
83+
footer: {
84+
style: 'light',
85+
logo: {
86+
alt: 'Meta Open Source Logo',
87+
src: 'img/meta_open_source_logo.svg',
88+
target: '_blank',
89+
href: 'https://opensource.fb.com/',
90+
height: 60,
91+
},
92+
links: [
93+
{
94+
title: 'Community',
95+
items: [
96+
{
97+
label: 'Hack & HHVM on GitHub',
98+
href: 'https://github.com/facebook/hhvm',
99+
},
100+
{
101+
label: 'Follow @hacklang on X',
102+
href: 'https://x.com/hacklang',
103+
},
104+
],
105+
},
106+
{
107+
title: 'Legal',
108+
items: [
109+
{
110+
label: 'Privacy Policy',
111+
href: 'https://opensource.facebook.com/legal/privacy/',
112+
target: '_blank',
113+
rel: 'noreferrer noopener',
114+
},
115+
{
116+
label: 'Terms of Use',
117+
href: 'https://opensource.facebook.com/legal/terms/',
118+
target: '_blank',
119+
rel: 'noreferrer noopener',
120+
},
121+
],
122+
},
123+
{
124+
title: 'Contributing',
125+
items: [
126+
{
127+
label: 'Source Code for this Site',
128+
href: 'https://github.com/hhvm/hacklang.org',
129+
},
130+
],
131+
},
132+
],
133+
copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc. Built with Docusaurus.`,
134+
},
135+
prism: {
136+
theme: lightCodeTheme,
137+
additionalLanguages: ['php'],
138+
},
139+
}),
140+
});

i18n/en.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

package.json

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
11
{
2+
"name": "staticdocs-starter",
3+
"version": "0.0.0",
4+
"private": true,
25
"scripts": {
3-
"examples": "docusaurus-examples",
4-
"start": "docusaurus-start",
5-
"build": "docusaurus-build",
6-
"publish-gh-pages": "docusaurus-publish",
7-
"write-translations": "docusaurus-write-translations",
8-
"version": "docusaurus-version",
9-
"rename-version": "docusaurus-rename-version"
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"clean": "docusaurus clear",
13+
"serve": "docusaurus serve",
14+
"write-translations": "docusaurus write-translations",
15+
"write-heading-ids": "docusaurus write-heading-ids"
1016
},
11-
"devDependencies": {
12-
"docusaurus": "^1.14.7"
17+
"dependencies": {
18+
"@docusaurus/core": "^3.9.2",
19+
"@docusaurus/plugin-content-pages": "^3.9.2",
20+
"@docusaurus/preset-classic": "^3.9.2",
21+
"@docusaurus/theme-mermaid": "^3.9.2",
22+
"@mdx-js/react": "^3.1.0",
23+
"clsx": "^1.2.1",
24+
"prism-react-renderer": "^2.4.1",
25+
"react": "^18.3.1",
26+
"react-dom": "^18.3.1"
27+
},
28+
"browserslist": {
29+
"production": [
30+
">0.5%",
31+
"not dead",
32+
"not op_mini all"
33+
],
34+
"development": [
35+
"last 1 chrome version",
36+
"last 1 firefox version",
37+
"last 1 safari version"
38+
]
1339
}
1440
}

0 commit comments

Comments
 (0)