diff --git a/Makefile b/Makefile
index 503d286..96f54c9 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ run-dev:
GIT_BUILD_TAG=${BUILD_TAG} \
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
GIT_REVISION=$(shell git rev-parse --short HEAD) \
+ GIT_REPO=$(shell git config --get remote.origin.url) \
PATH_PREFIX=/datalab \
PREFIX_PATHS=true \
yarn start
\ No newline at end of file
diff --git a/gatsby-config.js b/gatsby-config.js
index 03f3a6b..575b9ab 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -9,11 +9,19 @@ console.log("gatsby-config")
console.log("NODE_ENV", process.env.NODE_ENV)
console.log("PATH_PREFIX", process.env.PATH_PREFIX)
console.log("GATSBY_PATH_PREFIX", process.env.GATSBY_PATH_PREFIX)
+console.log("GIT_BUILD_TAG", process.env.GIT_BUILD_TAG)
+console.log("GIT_BRANCH", process.env.GIT_BRANCH)
+console.log("GIT_REVISION", process.env.GIT_REVISION)
+console.log("GIT_REPO", process.env.GIT_REPO)
module.exports = {
siteMetadata: {
title: `impresso-datalab`,
siteUrl: `https://impresso-project.ch/datalab`,
+ gitBuildTag: process.env.GIT_BUILD_TAG,
+ gitBranch: process.env.GIT_BRANCH,
+ gitRevision: process.env.GIT_REVISION,
+ gitRepo: process.env.GIT_REPO,
},
pathPrefix: process.env.PATH_PREFIX || "/",
plugins: [
diff --git a/src/components/Background.css b/src/components/Background.css
index 5e96845..633e1d5 100644
--- a/src/components/Background.css
+++ b/src/components/Background.css
@@ -74,6 +74,7 @@
top: calc(50% - var(--circle-size) / 2);
left: calc(50% - var(--circle-size) / 2);
+ will-change: transform;
transform-origin: center center;
animation: moveVertical 80s ease infinite;
@@ -96,6 +97,7 @@
left: calc(50% - var(--circle-size) / 2);
transform-origin: calc(50% - 400px);
+ will-change: transform;
animation: moveInCircle 100s reverse infinite;
opacity: 1;
@@ -116,6 +118,7 @@
top: calc(50% - var(--circle-size) / 2 - 200px);
left: calc(50% - var(--circle-size) / 2 + 500px);
+ will-change: transform;
transform-origin: calc(50% + 400px);
animation: moveInCircle 120s linear infinite;
diff --git a/src/components/Footer.js b/src/components/Footer.js
new file mode 100644
index 0000000..c0b8eae
--- /dev/null
+++ b/src/components/Footer.js
@@ -0,0 +1,61 @@
+import React from "react"
+import { Link } from "gatsby"
+import { Container, Row, Col } from "react-bootstrap"
+import { useSiteMetadata } from "../hooks"
+import { Github } from "iconoir-react"
+
+const getGithubRepoUrl = (gitRepo, gitRevision) => {
+ // Regular expression to extract the repository path from the gitRepo string
+ const repoRegex = /github\.com[:/](.*)\.git/
+ const repoMatches = gitRepo.match(repoRegex)
+ if (repoMatches && repoMatches.length > 1) {
+ const repoPath = repoMatches[1]
+ return `https://github.com/${repoPath}/commit/${gitRevision}`
+ } else {
+ console.error("Invalid gitRepo format.")
+ return null
+ }
+}
+
+const Footer = () => {
+ const site = useSiteMetadata()
+ const gitRepoUrl = getGithubRepoUrl(site.gitRepo, site.gitRevision)
+
+ console.log("[Footer] render site:", site)
+ return (
+
+ )
+}
+
+export default Footer
diff --git a/src/components/Layout.js b/src/components/Layout.js
index 5691851..d5ea933 100644
--- a/src/components/Layout.js
+++ b/src/components/Layout.js
@@ -1,38 +1,18 @@
-import { Link } from "gatsby";
-import React from "react";
-import { Col, Container, Row } from "react-bootstrap";
-import Header from "./Header";
-import { useDataStore } from "../store";
-import Background from "./Background";
+import React from "react"
+import Header from "./Header"
+import Footer from "./Footer"
+import Background from "./Background"
const Layout = ({ children }) => {
- const isDataReady = useDataStore((state) => state.isReady);
-
- console.log("[Layout] render");
+ console.log("[Layout] render")
return (
<>
{children}
-
+
>
- );
-};
+ )
+}
-export default Layout;
+export default Layout
diff --git a/src/hooks.js b/src/hooks.js
new file mode 100644
index 0000000..e74db2e
--- /dev/null
+++ b/src/hooks.js
@@ -0,0 +1,19 @@
+import { useStaticQuery, graphql } from "gatsby"
+
+export const useSiteMetadata = () => {
+ const { site } = useStaticQuery(graphql`
+ query SiteQuery {
+ site {
+ siteMetadata {
+ title
+ siteUrl
+ gitBuildTag
+ gitBranch
+ gitRevision
+ gitRepo
+ }
+ }
+ }
+ `)
+ return site.siteMetadata
+}
diff --git a/src/notebooks/introduction-to-topic-modeling.mdx b/src/notebooks/introduction-to-topic-modeling.mdx
index 58450dd..4499d69 100644
--- a/src/notebooks/introduction-to-topic-modeling.mdx
+++ b/src/notebooks/introduction-to-topic-modeling.mdx
@@ -1,5 +1,7 @@
---
-title: 'Introduction to topic modeling'
+title: "Introduction to topic modeling"
url: https://colab.research.google.com/github/littlecolumns/ds4j-notebooks/blob/master/text-analysis/notebooks/Introduction%20to%20topic%20modeling.ipynb
-author: '@littlecolumns'
+author: "@littlecolumns"
---
+
+Make