Skip to content

Commit

Permalink
fix: metadata and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenrockstudios committed Jul 23, 2023
1 parent e033332 commit afbf552
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 14 deletions.
2 changes: 2 additions & 0 deletions blog/2023-07-21-frog-of-war-dev-update-1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Welcome to the latest update from our studio! We're excited to introduce you to

Prepare yourselves for an action-packed adventure as we plunge you into the heart of the battle, taking on the persona of agile and fearless frogs. This isn't your typical first-person shooter; it's an entirely unique and captivating concept that will keep you hooked from the first leap!

<!--truncate-->

As you dive into the game, you'll be able to choose from a variety of game modes that cater to different playstyles. Engage in intense deathmatches where reflexes and precision are your best allies, or opt for the adrenaline-pumping excitement of our battle royale mode, where only the toughest amphibians will survive!

But that's not all; we have even more surprises in store! Our team has been hard at work crafting an array of innovative game modes that will challenge your strategy, teamwork, and skills. Whether you're a seasoned gamer or a newcomer to the battlefield, there's something here for everyone!
Expand Down
19 changes: 14 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const config = {
title: 'Broken Rock Studios',
tagline: 'Multiplayer and Fun',
favicon: 'img/favicon.ico',

trailingSlash: false,
// Set the production url of your site here
url: 'https://brokenrockstudios.com',
baseUrl: '/',
organizationName: 'brokenrockstudios',
projectName: 'website',
projectName: 'website',
deploymentBranch: 'gh-pages',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand All @@ -23,7 +23,12 @@ const config = {
defaultLocale: 'en',
locales: ['en'],
},

customFields: {
about: {
title: 'About',
description: 'About us',
}
},
presets: [
[
'classic',
Expand All @@ -36,6 +41,9 @@ const config = {
sidebarCollapsible: true,
},
blog: {
blogTitle: 'News',
blogDescription: 'Multiplayer and Fun',
blogListComponent: '/src/components/BlogListPage',
routeBasePath: '/',
},
theme: {
Expand All @@ -48,6 +56,7 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/logo-500x500.png',
navbar: {
title: 'Broken Rock Studios',
logo: {
Expand All @@ -63,8 +72,8 @@ const config = {
position: 'left',
label: 'Media',
},
{to: 'https://www.fangamer.com/', label: 'Store', position: 'left'},
{to: '/about', label: 'About', position: 'left'},
{ to: 'https://www.fangamer.com/', label: 'Store', position: 'left' },
{ to: '/about', label: 'About', position: 'left' },
{
href: 'https://store.steampowered.com',
label: 'Buy Frog of War',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import Link from '@docusaurus/Link';
import clsx from 'clsx';

import styles from './styles.module.css';
Expand All @@ -10,7 +9,7 @@ export default function AboutPage({ descriptionLines }) {
<div
className={clsx('footer__link-item', styles.title,)}
>
<img src={require('@site/static/img/adam-gorman-headshot.png').default} />
<img src={require('@site/static/img/about/adam-gorman-headshot.png').default} />
<span>Adam Gorman</span>
</div>
<span className={styles.subtitle}>Developer</span>
Expand Down
File renamed without changes.
54 changes: 54 additions & 0 deletions src/components/BlogListPage/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import clsx from 'clsx';

import {
PageMetadata,
HtmlClassNameProvider,
ThemeClassNames,
} from '@docusaurus/theme-common';
import BlogLayout from '@theme/BlogLayout';
import BlogListPaginator from '@theme/BlogListPaginator';
import SearchMetadata from '@theme/SearchMetadata';
import type {Props} from '@theme/BlogListPage';
import BlogPostItems from '@theme/BlogPostItems';

function BlogListPageMetadata(props: Props): JSX.Element {
const {metadata} = props;
const {blogTitle, blogDescription} = metadata;
return (
<>
<PageMetadata title={blogTitle} description={blogDescription} />
<SearchMetadata tag="blog_posts_list" />
</>
);
}

function BlogListPageContent(props: Props): JSX.Element {
const {metadata, items, sidebar} = props;
return (
<BlogLayout sidebar={sidebar}>
<BlogPostItems items={items} />
<BlogListPaginator metadata={metadata} />
</BlogLayout>
);
}

export default function BlogListPage(props: Props): JSX.Element {
return (
<HtmlClassNameProvider
className={clsx(
ThemeClassNames.wrapper.blogPages,
ThemeClassNames.page.blogListPage,
)}>
<BlogListPageMetadata {...props} />
<BlogListPageContent {...props} />
</HtmlClassNameProvider>
);
}
16 changes: 9 additions & 7 deletions src/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import { translate } from '@docusaurus/Translate';

import styles from './about.module.css';
import HomePage from '../components/About';
import AboutPage from '../components/AboutPage';

function Home() {


function About() {
const context = useDocusaurusContext();
let { siteConfig } = context;

const aboutConfig = siteConfig.customFields.about as {[key: string]: unknown};
const lines = [
translate({
id: 'homepage.description.descriptionLine_1',
Expand All @@ -30,14 +32,14 @@ function Home() {

return (
<Layout
title={siteConfig.title}
description={siteConfig.customFields.description as string}
title={aboutConfig.title as string}
description={aboutConfig.description as string}
>
<main className={styles.heroContainer}>
<HomePage {...siteConfig} descriptionLines={lines} />
<AboutPage {...siteConfig} descriptionLines={lines} />
</main>
</Layout>
);
}

export default Home;
export default About;
File renamed without changes
Binary file added static/img/fow-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/logo-1000x1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/logo-500x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:

0 comments on commit afbf552

Please sign in to comment.