Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[website] SEO and load time optimization #648

Merged
merged 7 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions compositor_api/src/types/component.rs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New clippy

Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ pub struct View {
/// Width of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub width: Option<f32>,
/// Height of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub height: Option<f32>,

Expand Down Expand Up @@ -129,13 +129,13 @@ pub struct Rescaler {
/// Width of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub width: Option<f32>,
/// Height of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub height: Option<f32>,

Expand Down Expand Up @@ -352,13 +352,13 @@ pub struct Tiles {
/// Width of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub width: Option<f32>,
/// Height of a component in pixels. Exact behavior might be different based on the parent
/// component:
/// - If the parent component is a layout, check sections "Absolute positioning" and "Static
/// positioning" of that component.
/// positioning" of that component.
/// - If the parent component is not a layout, then this field is required.
pub height: Option<f32>,

Expand Down
20 changes: 19 additions & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Live Compositor',
title: 'LiveCompositor',
favicon: 'img/favicon.png',

// Set the production url of your site here
Expand Down Expand Up @@ -65,6 +65,24 @@ const config: Config = {
],

themeConfig: {
metadata: [
{ name: 'description', content: 'Real-time, low latency, programmable video & audio mixer' },
{ name: 'keywords', content: 'video, audio, mixing, real-time, live' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:title', content: 'LiveCompositor' },
{
name: 'twitter:description',
content: 'Real-time, low latency, programmable video & audio mixer',
},
{ name: 'twitter:site', content: 'ElixirMembrane' },
{ name: 'og:type', content: 'website' },
{ name: 'og:title', content: 'LiveCompositor' },
{
name: 'og:description',
content: 'Real-time, low latency, programmable video & audio mixer',
},
{ name: 'og:url', content: 'https://compositor.live/' },
],
colorMode: {
defaultMode: 'dark',
},
Expand Down
4 changes: 1 addition & 3 deletions docs/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
declare module '*.png';
declare module '*.svg';
declare module '*.jpeg';
declare module '*.jpg';
declare module '*.webp';
3 changes: 3 additions & 0 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
--ifm-color-primary-lighter: #8080f9;
--ifm-color-primary-lightest: #a5abfc;
--ifm-code-font-size: 95%;
--ifm-h1-font-size: 2.25rem;
--ifm-h2-font-size: 2rem;
--ifm-h3-font-size: 1.5rem;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

Expand Down
36 changes: 16 additions & 20 deletions docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { GiFeather, GiBattery100, GiSpeedometer } from 'react-icons/gi';
import { IoCloudOffline } from 'react-icons/io5';
import { MdAudiotrack, MdLiveTv } from 'react-icons/md';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Heading from '@theme/Heading';

Expand All @@ -14,12 +13,12 @@ import { PropsWithChildren } from 'react';
import { IconContext, IconType } from 'react-icons';
import MembraneLogo from '@site/static/img/membrane-logo.svg';
import SwmLogo from '@site/static/img/swm-logo.svg';
import ComposingImg from '@site/static/img/how_it_works.png';
import ComposingImg from '@site/static/img/how_it_works.webp';
import WebGpuLogoDark from '@site/static/img/webgpu-dark.svg';
import WebGpuLogoLight from '@site/static/img/webgpu-light.svg';
import VideoConferencingImg from '@site/static/img/videoconferencing.jpg';
import StreamingImg from '@site/static/img/streaming.jpg';
import BroadcastingImg from '@site/static/img/broadcasting.jpg';
import VideoConferencingImg from '@site/static/img/videoconferencing.webp';
import StreamingImg from '@site/static/img/streaming.webp';
import BroadcastingImg from '@site/static/img/broadcasting.webp';
import { useColorMode } from '@docusaurus/theme-common';
import TypewriterComponent from 'typewriter-effect';
import ExampleScene from '../components/example_scene';
Expand Down Expand Up @@ -85,7 +84,7 @@ function HomepageHeader() {
autoPlay
muted
src="/video/showcase.mp4"
poster="/img/showcase_poster.jpg"
poster="/img/showcase_poster.png"
WojciechBarczynski marked this conversation as resolved.
Show resolved Hide resolved
style={{ width: '100%', display: 'block' }}
/>
</div>
Expand All @@ -98,7 +97,7 @@ function HomepageHeader() {
function HowItWorks() {
return (
<div className="container margin-top--md">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
How it works?
</Heading>
<p className={clsx('text--center', styles.grayText)}>
Expand All @@ -123,7 +122,7 @@ function HowItWorks() {
function UseCases() {
return (
<div className="container margin-top--md">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
Use cases
</Heading>
<p className={clsx('text--center', styles.grayText)}>
Expand Down Expand Up @@ -156,7 +155,7 @@ function UseCaseCard(props: UseCaseCardProps) {
return (
<div className={clsx('card', styles.card, styles.hoverPrimary)}>
<div className="text--primary">
<Heading as="h2" style={{ textAlign: 'center', margin: 0 }}>
<Heading as="h3" style={{ textAlign: 'center', margin: 0 }}>
{props.title}
</Heading>
</div>
Expand All @@ -173,7 +172,7 @@ function UseCaseCard(props: UseCaseCardProps) {
function VisionCards() {
return (
<div className="container margin-top--md">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
Vision
</Heading>
<p className={clsx('text--center', styles.grayText)}>
Expand Down Expand Up @@ -216,7 +215,7 @@ function VisionCard(props: PropsWithChildren<VisionCardProps>) {
<Icon className={styles.icon} />
</div>
<div className="card__header">
<Heading as="h2" style={{ textAlign: 'center' }}>
<Heading as="h3" style={{ textAlign: 'center' }}>
{props.title}
</Heading>
</div>
Expand All @@ -234,7 +233,7 @@ type FeatureProps = {
function Feature(props: PropsWithChildren<FeatureProps>) {
const text = (
<div className="col">
<Heading as="h2" className="margin-top--sm">
<Heading as="h3" className="margin-top--sm">
{props.text}
</Heading>
<p>{props.secondaryText}</p>
Expand Down Expand Up @@ -263,7 +262,7 @@ function Features() {

return (
<div className="container margin-top--lg margin-bottom--md">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
Capabilities
</Heading>
<p className={clsx('text--center', styles.grayText)}>Simple, powerful, fast. Pick three.</p>
Expand Down Expand Up @@ -426,7 +425,7 @@ function MembranePlugin() {
function Usage() {
return (
<div className="container">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
Usage
</Heading>
<StandaloneSever />
Expand All @@ -439,7 +438,7 @@ function Usage() {
function Licensing() {
return (
<div className="container margin-top--lg margin-bottom--md">
<Heading as="h1" className="margin-bottom--md text--center text--primary">
<Heading as="h2" className="margin-bottom--md text--center text--primary">
Licensing
</Heading>
<div className="card container">
Expand Down Expand Up @@ -495,7 +494,7 @@ function ContactUs() {
<SwmLogo width={220} className="margin--lg" style={{ alignSelf: 'center' }} />
<div className="col">
<div className="card__header margin-top--md">
<Heading as="h1">
<Heading as="h2">
<span className="text--primary">Contact</span> us
</Heading>
</div>
Expand All @@ -517,11 +516,8 @@ function ContactUs() {
}

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={siteConfig.title}
description="Tool for real-time video processing / transforming / composing">
<Layout>
<HomepageHeader />
<div className={styles.sectionSeparator} />
<HowItWorks />
Expand Down
Binary file removed docs/static/img/broadcasting.jpg
Binary file not shown.
Binary file added docs/static/img/broadcasting.webp
Binary file not shown.
Binary file removed docs/static/img/how_it_works.png
Binary file not shown.
Binary file added docs/static/img/how_it_works.webp
Binary file not shown.
Binary file removed docs/static/img/showcase_poster.jpg
Binary file not shown.
Binary file added docs/static/img/showcase_poster.webp
Binary file not shown.
Binary file added docs/static/img/streaming.webp
Binary file not shown.
Binary file removed docs/static/img/videoconferencing.jpg
Binary file not shown.
Binary file added docs/static/img/videoconferencing.webp
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:
8 changes: 4 additions & 4 deletions integration_tests/src/tests/push_input_before_start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
///
/// Output:
/// - Display entire input stream from the beginning (16 seconds). No black frames at the
/// beginning. Starts with a green color.
/// beginning. Starts with a green color.
/// - Black screen for remaining 4 seconds.
#[test]
pub fn push_input_before_start_tcp() -> Result<()> {
Expand Down Expand Up @@ -98,7 +98,7 @@ pub fn push_input_before_start_tcp() -> Result<()> {
///
/// Output:
/// - Display entire input stream from the beginning (16 seconds). No black frames at the
/// beginning. Starts with a green screen.
/// beginning. Starts with a green screen.
/// - Black screen for remaining 4 seconds.
#[test]
pub fn push_input_before_start_udp() -> Result<()> {
Expand Down Expand Up @@ -183,7 +183,7 @@ pub fn push_input_before_start_udp() -> Result<()> {
///
/// Output:
/// - Display input stream without initial 5 seconds from the beginning (11 seconds). Not black frames at the
/// beginning. Starts with a red color. Initial 5 second of input stream is missing.
/// beginning. Starts with a red color. Initial 5 second of input stream is missing.
/// - Black screen for remaining 9 seconds.
#[test]
pub fn push_input_before_start_tcp_no_offset() -> Result<()> {
Expand Down Expand Up @@ -268,7 +268,7 @@ pub fn push_input_before_start_tcp_no_offset() -> Result<()> {
///
/// Output:
/// - Display entire input stream from the beginning (16 seconds). No black frames at the
/// beginning. Starts with a red color. Initial 5 second of input stream is missing.
/// beginning. Starts with a red color. Initial 5 second of input stream is missing.
/// - Black screen for remaining 19 seconds.
#[test]
pub fn push_input_before_start_udp_no_offset() -> Result<()> {
Expand Down
Loading