Skip to content

Commit 3cfbc30

Browse files
authored
Chore/new theme (#249)
* chore(package.json): remove unnecessary deps, add new preset, prettier and engines fields * chore: hook up @ionic-docs preset * chore: package-lock * chore(website): config formatting * chore(website): add default code styles * chore(website): hook up gtm * styles(website): remove abstracted styles * chore(website): remove breadcrumbs * chore(website): bump @ionic-docs/preset-classic dep
1 parent a03ffec commit 3cfbc30

File tree

7 files changed

+5474
-18778
lines changed

7 files changed

+5474
-18778
lines changed

website/docusaurus.config.js

Lines changed: 76 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,109 @@
11
/** @type {import('@docusaurus/types').DocusaurusConfig} */
22

3-
const lernaConfig = require("../lerna.json");
3+
const lernaConfig = require('../lerna.json');
44

55
module.exports = {
6-
title: "Ionic Portals",
7-
tagline: "Portals tagline",
8-
url: "https://ionic.io",
6+
title: 'Ionic Portals',
7+
tagline: 'Portals tagline',
8+
url: 'https://ionic.io',
99
trailingSlash: false,
10-
baseUrl: "/docs/portals/",
10+
baseUrl: '/docs/portals/',
1111
baseUrlIssueBanner: false,
12-
onBrokenLinks: "throw",
13-
onBrokenMarkdownLinks: "warn",
14-
favicon: "img/logo.svg",
15-
organizationName: "ionic-team",
16-
projectName: "portals-docs",
17-
titleDelimiter: "-",
12+
onBrokenLinks: 'throw',
13+
onBrokenMarkdownLinks: 'warn',
14+
favicon: 'img/logo.svg',
15+
organizationName: 'ionic-team',
16+
projectName: 'portals-docs',
17+
titleDelimiter: '-',
1818
themeConfig: {
19+
logo: {
20+
alt: 'Portals Logo',
21+
src: 'img/logo-light.png',
22+
srcDark: 'img/logo-dark.png',
23+
href: '/docs/portals',
24+
height: 24,
25+
width: 84,
26+
},
1927
navbar: {
20-
title: "Portals",
21-
logo: {
22-
alt: "Portals Logo",
23-
src: "img/logo.svg",
28+
items: [
29+
{
30+
type: 'search',
31+
position: 'left',
32+
},
33+
],
34+
},
35+
sidebar: {
36+
productDropdown: {
37+
title: 'Portals Docs',
38+
logo: {
39+
width: 20,
40+
height: 20,
41+
alt: 'Portals Logo',
42+
src: 'img/components/product-dropdown/logo.png',
43+
},
44+
textLinks: [
45+
{
46+
url: {
47+
href: 'https://forum.ionicframework.com/c/portals/31',
48+
target: '_blank',
49+
rel: 'noopener nofollow',
50+
},
51+
label: 'Forum',
52+
},
53+
],
54+
iconLinks: [
55+
{
56+
key: 'github',
57+
url: {
58+
href: 'https://github.com/ionic-team/ionic-portals',
59+
target: '_blank',
60+
rel: 'noopener nofollow',
61+
},
62+
},
63+
],
64+
},
65+
backButton: {
66+
url: {
67+
href: '/docs',
68+
},
2469
},
2570
},
2671
colorMode: {
2772
respectPrefersColorScheme: true,
2873
},
29-
tagManager: {
30-
trackingID: "GTM-TKMGCBC",
31-
},
3274
prism: {
33-
theme: { plain: {}, styles: [] },
34-
additionalLanguages: [
35-
"shell-session",
36-
"kotlin",
37-
"groovy",
38-
"java",
39-
"swift",
40-
"ruby",
41-
],
75+
theme: require('prism-react-renderer/themes/github'),
76+
darkTheme: require('prism-react-renderer/themes/dracula'),
77+
additionalLanguages: ['shell-session', 'kotlin', 'groovy', 'java', 'swift', 'ruby'],
4278
},
4379
zoom: {
44-
selector: ".markdown em > img",
80+
selector: '.markdown em > img',
4581
background: {
46-
light: "var(--token-background-color)",
47-
dark: "var(--token-background-color)"
82+
light: 'var(--token-background-color)',
83+
dark: 'var(--token-background-color)',
4884
},
4985
config: {
5086
margin: 75,
51-
scrollOffset: 20
87+
scrollOffset: 20,
5288
},
5389
},
5490
},
55-
plugins: [
56-
"@ionic-internal/docusaurus-plugin-tag-manager",
57-
"docusaurus-plugin-sass",
58-
"docusaurus-plugin-image-zoom",
59-
],
60-
themes: ["@ionic-internal/docusaurus-theme"],
91+
plugins: ['docusaurus-plugin-image-zoom'],
6192
presets: [
6293
[
63-
"@docusaurus/preset-classic",
94+
'@ionic-docs/preset-classic',
6495
{
6596
docs: {
66-
routeBasePath: "/",
67-
sidebarPath: require.resolve("./sidebars.js"),
97+
routeBasePath: '/',
98+
sidebarPath: require.resolve('./sidebars.js'),
99+
breadcrumbs: false,
68100
},
69-
blog: false,
70101
pages: false,
71102
theme: {
72-
customCss: [
73-
"prismjs/themes/prism-tomorrow.css",
74-
require.resolve("./src/styles/custom.css"),
75-
],
103+
customCss: [require.resolve('./src/styles/custom.css')],
104+
},
105+
googleTagManager: {
106+
containerId: 'GTM-TKMGCBC',
76107
},
77108
},
78109
],

0 commit comments

Comments
 (0)