Skip to content

Commit

Permalink
Fix trailing slash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
spaaaacccee committed May 24, 2024
1 parent 9410817 commit 2ebc719
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 20 deletions.
2 changes: 1 addition & 1 deletion blog/2023-09-22-changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Get Posthoc as a standalone application for Linux.

[View Releases](https://github.com/ShortestPathLab/posthoc-app/releases)

#### Posthoc PWA (Github Pages)
#### Posthoc PWA (GitHub Pages)

Use Posthoc in your browser, or install it as a web app.

Expand Down
2 changes: 1 addition & 1 deletion docs/3-visualiser/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ sidebar_position: 4

# Contributing

We welcome new issues, discussions, and PRs on our [Github repository](https://github.com/ShortestPathLab/posthoc-app).
We welcome new issues, discussions, and PRs on our [GitHub repository](https://github.com/ShortestPathLab/posthoc-app).

Check out our roadmap [here](https://github.com/orgs/path-visualiser/projects/2/views/2).
3 changes: 2 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config: Config = {
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
trailingSlash: false,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down Expand Up @@ -83,7 +84,7 @@ const config: Config = {
},
{
href: "https://github.com/ShortestPathLab/posthoc-app",
label: "Github",
label: "GitHub",
position: "left",
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import {
} from "@mui/material";
import PopupState, { bindTrigger } from "material-ui-popup-state";
import { createPortal } from "react-dom";
import l10n from "../pages/en-au.json";
import { Logo } from "./Logo";
import { useMode } from "./ModeContext";
import { space } from "./space";
import { usePaper } from "./theme";
import { useSm } from "./useSm";
import BrowserOnly from "@docusaurus/BrowserOnly";
import { l10n } from "../l10n";

export function AppBar() {
const sm = useSm();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Button, Divider, Stack, Typography } from "@mui/material";
import { grid } from "./grid";
import l10n from "../pages/en-au.json";
import { l10n } from "../l10n";
import { Logo } from "./Logo";
import { useSm } from "./useSm";
import { space } from "./space";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { clamp, floor } from "lodash";
import { useEffect, useState } from "react";
import AutoSize from "react-virtualized-auto-sizer";
import resolve from "resolve-url";
import l10n from "../pages/en-au.json";
import { l10n } from "../l10n";
import { usePaper } from "./theme";
import { useSm } from "./useSm";

Expand Down
2 changes: 1 addition & 1 deletion src/components/GetStartedButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ArrowForward } from "@mui/icons-material";
import { Button, useTheme } from "@mui/material";
import l10n from "../pages/en-au.json";
import { l10n } from "../l10n";

export function GetStartedButton() {
const mode = useTheme().palette.mode;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FilterTiltShiftOutlined as ShowVideoIcon } from "@mui/icons-material";
import { Button, Link, Stack, Typography } from "@mui/material";
import l10n from "../pages/en-au.json";
import { l10n } from "../l10n";
import { space } from "./space";
import { GetStartedButton } from "./GetStartedButton";
import { useSm } from "./useSm";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentProps } from "react";
import l10n from "../pages/en-au.json";
import { l10n } from "../l10n";

export function Logo(props: ComponentProps<"img">) {
return <img src={l10n.logoUrl} width={32} height={32} {...props} />;
Expand Down
20 changes: 10 additions & 10 deletions src/pages/en-au.json → src/l10n/en-au.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
{ "key": "blog", "label": "Blog", "url": "./blog" },
{
"key": "github",
"label": "Github",
"label": "GitHub",
"url": "https://github.com/shortestpathlab/posthoc-app"
}
],
"gallery": [
{
"tagline": "Analysis",
"tagline": "Analyse",
"url": "/img/gallery/complex-view.png",
"workspace": "/content/starcraft.min.workspace",
"label": "Post-game breakdown",
Expand All @@ -34,14 +34,14 @@
{
"tagline": "Showcase",
"url": "/img/gallery/image-7.png",
"label": "Video compression",
"label": "Animation demo",
"workspace": "/content/apple.min.workspace",
"author": "Mark Carlson",
"avatar": null,
"description": "A simple encoding scheme for black and white video based on run-length encoding."
},
{
"tagline": "Interrogation",
"tagline": "Understand",
"url": "/img/gallery/astar.png",
"label": "A* search",
"workspace": "/content/astar.min.workspace",
Expand All @@ -50,16 +50,16 @@
"description": "Get to know Posthoc by taking apart and inspecting the classic A* algorithm on a small grid map."
},
{
"tagline": "Debugging",
"tagline": "Explore",
"url": "/img/gallery/image-3.png",
"workspace": "/content/dps.workspace",
"label": "Dual euclidean path search",
"description": "Visually verify that DPS can correctly generate shortest paths for a simple map.",
"label": "Dual Euclidean path search",
"description": "DPS is an exciting new approach for Euclidean pathfinding. See how it works on a small poly map problem.",
"avatar": "https://github.com/heavenfall.png",
"author": "Ryan Hechenberger"
},
{
"tagline": "Demonstration",
"tagline": "Demonstrate",
"url": "/img/gallery/mcp.png",
"label": "Minimum communication policy",
"workspace": "/content/mcp.min.workspace",
Expand Down Expand Up @@ -125,7 +125,7 @@
},
{ "label": "Docs", "url": "./docs/overview" },
{
"label": "Github",
"label": "GitHub",
"url": "https://github.com/shortestpathlab/posthoc-app"
}
]
Expand All @@ -145,7 +145,7 @@
"label": "Tracker",
"url": "https://tracker.pathfinding.ai/"
},
{ "label": "Github", "url": "https://github.com/ShortestPathLab" }
{ "label": "GitHub", "url": "https://github.com/ShortestPathLab" }
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions src/l10n/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import enAu from "./en-au.json";
import zhCn from "./zh-cn.json";
export const l10n = enAu;
177 changes: 177 additions & 0 deletions src/l10n/zh-cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"org": "ShortestPathLab",
"orgUrl": "https://pathfinding.ai",
"name": "Posthoc",
"openAppLabel": "打开 Posthoc",
"logoUrl": "/img/logo192.png",
"closeVideo": "关闭视频",
"playVideo": "播放 ICAPS24 演示",
"backdropVideoUrl": "media/clip.webm",
"backdropVideoMime": "video/webm",
"demoVideoUrl": "https://drive.google.com/file/d/1ve-GQbgj0MGcouCdE0gxQON-20rpxtW5/preview",
"demoVideoThumbnail": "/img/primer-thumbnail.png",
"demoVideoMime": "video/webm",
"appUrl": "https://posthoc-app.pathfinding.ai",
"sections": [
{ "key": "docs", "label": "文档", "url": "./docs/overview" },
{ "key": "blog", "label": "博客", "url": "./blog" },
{
"key": "github",
"label": "GitHub",
"url": "https://github.com/shortestpathlab/posthoc-app"
}
],
"gallery": [
{
"tagline": "分析",
"url": "/img/gallery/complex-view.png",
"workspace": "/content/starcraft.min.workspace",
"label": "赛后分析",
"author": "Ryan Hechenberger",
"avatar": "https://github.com/heavenfall.png",
"description": "探索记录的星际争霸游戏中 AI 单位的决策。"
},
{
"tagline": "展示",
"url": "/img/gallery/image-7.png",
"label": "视频压缩",
"workspace": "/content/apple.min.workspace",
"author": "Mark Carlson",
"avatar": null,
"description": "基于游程编码的黑白视频的简单编码方案。"
},
{
"tagline": "审问",
"url": "/img/gallery/astar.png",
"label": "A* 搜索",
"workspace": "/content/astar.min.workspace",
"author": "ShortestPathLab",
"avatar": "https://github.com/ShortestPathLab.png",
"description": "通过拆解和检查小型网格地图上的经典 A* 算法,了解 Posthoc。"
},
{
"tagline": "调试",
"url": "/img/gallery/image-3.png",
"workspace": "/content/dps.workspace",
"label": "双欧几里得路径搜索",
"description": "直观验证 DPS 能否为简单地图正确生成最短路径。",
"avatar": "https://github.com/heavenfall.png",
"author": "Ryan Hechenberger"
},
{
"tagline": "演示",
"url": "/img/gallery/mcp.png",
"label": "最小通信策略",
"workspace": "/content/mcp.min.workspace",
"description": "查看代理如何通过最小通信策略处理执行延迟。",
"avatar": "https://github.com/YueZhang-studyuse.png",
"author": "Yue Zhang"
}
],
"galleryCallToAction": "在 Posthoc 中查看更多示例",
"heroTitle": "探索搜索中的决策制定",
"heroSubtitle": "Posthoc 是一种从日志创建简单有效的可视化的方法,帮助您理解搜索。",
"heroCallToAction": "开始使用",
"heroCallToActionUrl": "./docs/get-started",
"endCallToActionTitle": "准备尝试 Posthoc 吗?",
"demoSectionTitle": "在 ICAPS24 上展示",
"demoSectionSubtitle": "我们很高兴向搜索和规划社区介绍 Posthoc",
"featuresSectionTitle": "特点",
"featuresSectionSubtitle": "featuresSectionSubtitle",
"teamSectionTitle": "团队",
"teamSectionSubtitle": "由 Monash University ShortestPathLab 团队热情打造",
"features": [
{
"image": null,
"title": "",
"subtitle": ""
}
],
"docsSectionTitle": "docsSectionTitle",
"docsSectionSubtitle": "docsSectionSubtitle",
"docsUrlGeneric": "./docs/overview",
"docs": [
{
"key": "os",
"label": "操作系统",
"options": [
{ "key": "linux", "label": "Linux" },
{ "key": "windows", "label": "Windows" },
{ "key": "macos", "label": "MacOS" },
{ "key": "other", "label": "其他" }
]
},
{
"key": "lang",
"label": "语言",
"options": [
{ "key": "cpp", "label": "C++" },
{ "key": "python", "label": "Python" },
{ "key": "rust", "label": "Rust" },
{ "key": "other", "label": "其他" }
]
}
],
"docsCallToAction": "查看 %os 的 %lang Posthoc 文档",
"docsCallToActionGeneric": "了解 Posthoc 如何为您服务",
"showVideo": "观看 ICAPS24 演示",
"footerLinks": [
{
"title": "Posthoc",
"links": [
{
"label": "打开 Posthoc",
"url": "https://posthoc.pathfinding.ai"
},
{ "label": "文档", "url": "./docs/overview" },
{
"label": "GitHub",
"url": "https://github.com/shortestpathlab/posthoc-app"
}
]
},
{
"title": "ShortestPathLab",
"links": [
{
"label": "首页",
"url": "https://pathfinding.ai/"
},
{
"label": "基准测试",
"url": "https://benchmarks.pathfinding.ai/"
},
{
"label": "追踪器",
"url": "https://tracker.pathfinding.ai/"
},
{ "label": "GitHub", "url": "https://github.com/ShortestPathLab" }
]
},
{
"title": "Monash Optimisation",
"links": [{ "label": "首页", "url": "https://www.monash.edu" }]
}
],
"team": [
{
"name": "Kevin Zheng",
"title": "Posthoc 首席开发者",
"avatar": null,
"github": "https://github.com/Spaaaacccee"
},
{
"name": "Dr Daniel Harabor",
"title": "副教授",
"avatar": null,
"github": "https://harabor.net/daniel"
},
{
"name": "Dr Michael Wybrow",
"title": "副教授",
"avatar": null,
"github": "https://harabor.net/daniel"
}
],
"footerCopyright": "版权所有 © 2024 Monash University"
}
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { SectionTitle } from "../components/SectionTitle";
import { grid } from "../components/grid";
import { useSm } from "../components/useSm";
import { useTitleBar } from "../components/useTitleBar";
import l10n from "./en-au.json";
import "./index.module.css";
import { l10n } from "../l10n";

function Content() {
const sm = useSm();
Expand Down

0 comments on commit 2ebc719

Please sign in to comment.