Skip to content

Commit

Permalink
Set red graphite to default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
oleeskild committed Feb 4, 2025
1 parent 9a79022 commit 645de54
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 26 deletions.
12 changes: 11 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@ import Logger from "js-logger";
import { PublishFile } from "./src/publishFile/PublishFile";
import { FRONTMATTER_KEYS } from "./src/publishFile/FileMetaDataManager";

const defaultTheme = {
name: "Red Graphite",
author: "SeanWcom",
repo: "seanwcom/Red-Graphite-for-Obsidian",
screenshot: "thumbnail.png",
modes: ["dark", "light"],
cssUrl: "https://raw.githubusercontent.com/seanwcom/Red-Graphite-for-Obsidian/HEAD/theme.css",
};

const DEFAULT_SETTINGS: DigitalGardenSettings = {
githubRepo: "",
githubToken: "",
githubUserName: "",
gardenBaseUrl: "",
prHistory: [],
baseTheme: "dark",
theme: '{"name": "default", "modes": ["dark"]}',
// Stringify to be backwards compatible with older versions
theme: JSON.stringify(defaultTheme),
faviconPath: "",
useFullResolutionImages: false,
noteSettingsIsInitialized: false,
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "digitalgarden",
"name": "Digital Garden",
"version": "2.57.2",
"version": "2.58.0",
"minAppVersion": "0.12.0",
"description": "Publish your notes to the web for others to enjoy. For free.",
"author": "Ole Eskild Steensen",
Expand Down
51 changes: 31 additions & 20 deletions src/dg-testVault/.obsidian/core-plugins.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
[
"file-explorer",
"global-search",
"switcher",
"graph",
"backlink",
"canvas",
"outgoing-link",
"tag-pane",
"page-preview",
"daily-notes",
"templates",
"note-composer",
"command-palette",
"editor-status",
"bookmarks",
"outline",
"word-count",
"file-recovery"
]
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false,
"webviewer": false
}
14 changes: 10 additions & 4 deletions src/views/PublicationCenter/PublicationCenter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@
function validateFiles() {
problematicFiles = [];
if (!publishStatus) return;
// Check for multiple dgHome files
const homeFiles = [...publishStatus.publishedNotes, ...publishStatus.unpublishedNotes, ...publishStatus.changedNotes]
.filter(note => note.frontmatter && note.frontmatter["dg-home"] === true);
const homeFiles = [
...publishStatus.publishedNotes,
...publishStatus.unpublishedNotes,
...publishStatus.changedNotes,
].filter(
(note) => note.frontmatter && note.frontmatter["dg-home"] === true,
);
if (homeFiles.length > 1) {
homeFiles.forEach(file => {
homeFiles.forEach((file) => {
problematicFiles.push({
path: file.getPath(),
issue: "Multiple files marked as home page (dg-home: true). Only one file should be marked as home."
issue: "Multiple files marked as home page (dg-home: true). Only one file should be marked as home.",
});
});
}
Expand Down

0 comments on commit 645de54

Please sign in to comment.