Skip to content

Commit

Permalink
update cms config
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Nov 13, 2024
1 parent 1ae052c commit 7c4b6fb
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 113 deletions.
121 changes: 8 additions & 113 deletions _cms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const password = Deno.env.get("PASSWORD1")!;

const cms = lumeCMS({
site: {
name: "Julie Cogley Portfolio CMS",
description: "Edit the content of the Julie Cogley Portfolio site.",
url: "https://julie.cogley.jp",
name: "Rick Cogley Current Events CMS",
description: "Edit the content of the Rick Cogley Current Events site.",
url: "https://rick.cogley.jp",
body: `
<p>This is the CMS for a Japanese-language portfolio site, with a top index page, an about page, showcase pages to provide narrative about projects, and as-is copies of specific sites to act as a design archive.</p>
<p>This is the CMS for an English-language portfolio site, with just a single landing page. </p>
`,
},
auth: {
Expand All @@ -28,125 +28,20 @@ cms.storage(
"gh",
new GitHub({
client: new Octokit({ auth: Deno.env.get("GITHUB_TOKEN") }),
owner: "juliecogley",
repo: "julie_portfolio",
branch: "main",
owner: "rickcogley",
repo: "rick.cogley.jp",
branch: "master",
path: "src",
}),
);

// Configure an upload folder
cms.upload("assets", "gh:assets");

// Showcase pages collection
cms.collection(
"showcase",
"gh:showcase/*.vto",
[
{
name: "indextitle",
type: "text",
label: "Title for Top Index",
description: "Visible when hovering mouse over the top index image link",
attributes: {
required: true,
},
},
{
name: "indeximage",
type: "file",
label: "Image for Top Index",
description: "Image to display on the top page showcase grid.",
attributes: {
accept: "image/*",
required: true,
},
},
{
name: "metas",
type: "object",
fields: [
{
name: "title",
type: "text",
label: "Title of the Page",
description: "Visible in browser tab and page source head section",
attributes: {
required: true,
},
},
{
name: "description",
type: "textarea",
label: "Description for the Page",
description: "Visible in search engine results",
attributes: {
required: true,
},
},
{
name: "image",
type: "file",
description: "Image to link in head metadata.",
attributes: {
accept: "image/*",
required: true,
},
},
],
},
{
name: "category",
type: "select",
label: "Category",
description: "Category to categorize the page on the top index",
init(field) {
field.options = ["clientwork", "work", "classwork", "hobby"];
},
},
"draft: checkbox",
{
name: "order",
type: "number",
label: "Order",
description:
"Order in which the page will appear in the top menu. View all showcase pages at /showcase/ to see how the order number is currently set.",
attributes: {
required: true,
},
},
"content: markdown",
],
);

cms.document({
name: "Top Page",
description: "Edit the content of the home page",
store: "gh:index.vto",
fields: [
"title: text",
"description: text",
{
name: "priority",
type: "number",
label: "Priority for sitemap",
description:
"1 is highest priority, 0 is lowest priority, and you can set decimal numbers in between like 0.9.",
attributes: {
required: false,
min: 0,
max: 1,
step: 0.1,
},
},
"content: markdown",
],
});

cms.document({
name: "About Page",
description: "Edit the content of the about page",
store: "gh:about.vto",
store: "gh:index.yml",
fields: [
"title: text",
"description: text",
Expand Down
46 changes: 46 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c4b6fb

Please sign in to comment.