try to fix the titles
This commit is contained in:
parent
7b6b0b4176
commit
4507528f52
6 changed files with 6 additions and 7 deletions
|
|
@ -29,7 +29,6 @@ const {
|
||||||
<Footer />
|
<Footer />
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
window.getTopicColor = function (topicName) {
|
window.getTopicColor = function (topicName) {
|
||||||
console.log(topicName);
|
|
||||||
switch (topicName) {
|
switch (topicName) {
|
||||||
case "software":
|
case "software":
|
||||||
return "#0073e6";
|
return "#0073e6";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
|
|
||||||
const title = "Gists";
|
const title = "/gists";
|
||||||
const gists = await getCollection("gists");
|
const gists = await getCollection("gists");
|
||||||
gists.sort((a, b) => a.slug.localeCompare(b.slug));
|
gists.sort((a, b) => a.slug.localeCompare(b.slug));
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ export async function getStaticPaths() {
|
||||||
|
|
||||||
const { gist } = Astro.props;
|
const { gist } = Astro.props;
|
||||||
const { Content } = await gist.render();
|
const { Content } = await gist.render();
|
||||||
const pageTitle = `gist/${gist.data.title ?? gist.slug}`;
|
const pageTitle = `${gist.slug}`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PostLayout frontmatter={gist.data}>
|
<PostLayout frontmatter={gist.data} post={gist}>
|
||||||
<Fragment slot="head">
|
<Fragment slot="head">
|
||||||
<title>{pageTitle}</title>
|
<title>{pageTitle}</title>
|
||||||
<script type="module" src="/scripts/index.js"></script>
|
<script type="module" src="/scripts/index.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from "astro:content";
|
||||||
|
|
||||||
const title = "Git Repositories";
|
const title = "git repos";
|
||||||
const repos = await getCollection("git");
|
const repos = await getCollection("git");
|
||||||
repos.sort((a, b) => a.slug.localeCompare(b.slug));
|
repos.sort((a, b) => a.slug.localeCompare(b.slug));
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,9 @@ export async function getStaticPaths() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { repo } = Astro.props;
|
const { repo } = Astro.props;
|
||||||
|
const { slug } = Astro.params;
|
||||||
const { Content } = await repo.render();
|
const { Content } = await repo.render();
|
||||||
const pageTitle = `git/${repo.data.title ?? repo.slug}`;
|
const pageTitle = `${slug}.git`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PostLayout frontmatter={repo.data} post={repo}>
|
<PostLayout frontmatter={repo.data} post={repo}>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
export function getTopicColor(topicName) {
|
export function getTopicColor(topicName) {
|
||||||
console.log(topicName);
|
|
||||||
switch (topicName) {
|
switch (topicName) {
|
||||||
case "software":
|
case "software":
|
||||||
return "#0073e6";
|
return "#0073e6";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue