Skip to content

Commit

Permalink
chore: merge branch 'main' of github.com:deco-sites/starting into upd…
Browse files Browse the repository at this point in the history
…ate/to-app
  • Loading branch information
devartes committed Oct 31, 2023
2 parents dc1dbc4 + cfbae93 commit 9770049
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 395 deletions.
2 changes: 1 addition & 1 deletion components/decohelp/pages/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Image from "deco-sites/std/components/Image.tsx";
import { Section } from "deco/blocks/section.ts";

export interface Props {
Title: string;
Title?: string;
Version?: string;
/** @description Breadcrumb label for the home link */
homeLabel: string;
Expand Down
8 changes: 5 additions & 3 deletions components/decohelp/pages/ui/Content/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ export default function Page({
<div class="w-full">
<div class="w-full xl:px-0 lg:pl-0 px-6 relative z-0">
<div class="flex flex-col gap-[8px] lg:pt-0 pt-[161px]">
<h1 class="text-neutral-900 text-[40px] font-semibold leading-[48px]">
{Title}
</h1>
{Title && (
<h1 class="text-neutral-900 text-[40px] font-semibold leading-[48px]">
{Title}
</h1>
)}
{Version && Version.length > 0 && (
<span class="px-2 py-1 bg-white bg-opacity-0 rounded border border-zinc-300 text-neutral-900 text-[13px] font-semibold leading-tight w-min my-2.5 whitespace-nowrap">
{Version}
Expand Down
18 changes: 8 additions & 10 deletions fresh.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import * as $3 from "./routes/api/case.tsx";
import * as $4 from "./routes/api/leads.tsx";
import * as $5 from "./routes/api/ranking.ts";
import * as $6 from "./routes/api/webinar.tsx";
import * as $7 from "./routes/docs/[...slug].tsx";
import * as $8 from "./routes/gfm.css.ts";
import * as $9 from "./routes/hackathon4.ts";
import * as $10 from "./routes/index.tsx";
import * as $11 from "./routes/proxy/image/index.tsx";
import * as $7 from "./routes/gfm.css.ts";
import * as $8 from "./routes/hackathon4.ts";
import * as $9 from "./routes/index.tsx";
import * as $10 from "./routes/proxy/image/index.tsx";
import * as $$0 from "./islands/CampHeader.tsx";
import * as $$1 from "./islands/CampMentor.tsx";
import * as $$2 from "./islands/Case.tsx";
Expand Down Expand Up @@ -43,11 +42,10 @@ const manifest = {
"./routes/api/leads.tsx": $4,
"./routes/api/ranking.ts": $5,
"./routes/api/webinar.tsx": $6,
"./routes/docs/[...slug].tsx": $7,
"./routes/gfm.css.ts": $8,
"./routes/hackathon4.ts": $9,
"./routes/index.tsx": $10,
"./routes/proxy/image/index.tsx": $11,
"./routes/gfm.css.ts": $7,
"./routes/hackathon4.ts": $8,
"./routes/index.tsx": $9,
"./routes/proxy/image/index.tsx": $10,
},
islands: {
"./islands/CampHeader.tsx": $$0,
Expand Down
2 changes: 1 addition & 1 deletion islands/LiveProjects.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from "deco-sites/starting/sections/Live Projects/ProjectsGrid.tsx";
export { default } from "deco-sites/starting/sections/Live Projects/ProjectsGrid.tsx";
9 changes: 9 additions & 0 deletions loaders/denoLoader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MDFileContent } from "deco-sites/starting/components/ui/Types.tsx";
import type { LoaderContext } from "deco/types.ts";
import { redirect } from "deco/mod.ts";

/** @title {{{path}}} */
export interface Doc {
Expand All @@ -21,6 +22,14 @@ const loader = async (
const documentSlug = rest.join("/");
const path = props.docsPath ?? "docs";

if (documentSlug === "") {
const returnUrl = new URL(_req.url);
returnUrl.pathname = `/${path}/${language}/overview`;
return redirect(returnUrl.href, 307) as unknown as ReturnType<
typeof loader
>; // redirect, component won't be resolved, so don't need the data;
}

const url = new URL(
`../${path}/${documentSlug}/${language}.md`,
import.meta.url,
Expand Down
306 changes: 0 additions & 306 deletions routes/docs/[...slug].tsx

This file was deleted.

Loading

0 comments on commit 9770049

Please sign in to comment.