Skip to content

Commit

Permalink
fix(react): include flow diagram in docs build (datahub-project#9785)
Browse files Browse the repository at this point in the history
hsheth2 authored Feb 28, 2024
1 parent 1bcc9a6 commit 6888bfb
Showing 2 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs-website/sphinx/Makefile
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ venv: $(VENV_SENTINEL)

$(VENV_SENTINEL): requirements.txt
python3 -m venv $(VENV_DIR)
$(VENV_DIR)/bin/pip install --upgrade pip wheel setuptools
$(VENV_DIR)/bin/pip install -r requirements.txt
$(VENV_DIR)/bin/pip install --upgrade pip uv wheel setuptools
VIRTUAL_ENV=$(VENV_DIR) $(VENV_DIR)/bin/uv pip install -r requirements.txt
touch $(VENV_SENTINEL)

.PHONY: help html doctest linkcheck clean clean_all serve md
32 changes: 32 additions & 0 deletions docs-website/src/pages/hack_display_image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import Image from "@theme/IdealImage";

function DisplayImageHack() {
// Needed because the datahub-web-react app used to directly link to this image.
// See https://github.com/datahub-project/datahub/pull/9785

const context = useDocusaurusContext();
const { siteConfig } = context;

return (
<Layout
title={siteConfig.tagline}
description="DataHub is a data discovery application built on an extensible metadata platform that helps you tame the complexity of diverse data ecosystems."
>
<Image
className="hero__image"
img={require(`/img/diagrams/datahub-flow-diagram-light.png`)}
alt="DataHub Flow Diagram"
/>
<Image
className="hero__image"
img={require(`/img/diagrams/datahub-flow-diagram-dark.png`)}
alt="DataHub Flow Diagram"
/>
</Layout>
);
}

export default DisplayImageHack;

0 comments on commit 6888bfb

Please sign in to comment.