diff --git a/src/main/java/run/halo/app/model/support/ThemeProperty.java b/src/main/java/run/halo/app/model/support/ThemeProperty.java index f430d1622..d52045795 100644 --- a/src/main/java/run/halo/app/model/support/ThemeProperty.java +++ b/src/main/java/run/halo/app/model/support/ThemeProperty.java @@ -52,7 +52,7 @@ public class ThemeProperty { /** * Folder name. */ - private String folderName; + private String themePath; /** * Has options. diff --git a/src/main/java/run/halo/app/service/impl/ThemeServiceImpl.java b/src/main/java/run/halo/app/service/impl/ThemeServiceImpl.java index b3490f225..7654cabbd 100644 --- a/src/main/java/run/halo/app/service/impl/ThemeServiceImpl.java +++ b/src/main/java/run/halo/app/service/impl/ThemeServiceImpl.java @@ -412,8 +412,8 @@ public class ThemeServiceImpl implements ThemeService { themeProperty.setVersion(properties.getProperty("theme.version")); themeProperty.setAuthor(properties.getProperty("theme.author")); themeProperty.setAuthorWebsite(properties.getProperty("theme.author.website")); - themeProperty.setFolderName(themePath.getFileName().toString()); - themeProperty.setHasOptions(hasOptions(propertyPath)); + themeProperty.setThemePath(themePath.toString()); + themeProperty.setHasOptions(hasOptions(themePath)); return themeProperty; } catch (IOException e) { @@ -435,6 +435,8 @@ public class ThemeServiceImpl implements ThemeService { // Resolve the options path Path optionsPath = themePath.resolve(optionsName); + log.debug("Check options file for path: [{}]", optionsPath); + if (Files.exists(optionsPath)) { return true; } diff --git a/src/main/resources/templates/themes/anatole/theme.properties b/src/main/resources/templates/themes/anatole/theme.properties index 327e1683d..a7538696b 100644 --- a/src/main/resources/templates/themes/anatole/theme.properties +++ b/src/main/resources/templates/themes/anatole/theme.properties @@ -1,4 +1,4 @@ -theme.id=caicai.anatole +theme.id=caicai_anatole theme.name=Anatole theme.website=https://github.com/hi-caicai/farbox-theme-Anatole theme.description=A other farbox theme diff --git a/src/main/resources/templates/themes/material/theme.properties b/src/main/resources/templates/themes/material/theme.properties index c61b10412..b5c79de6f 100644 --- a/src/main/resources/templates/themes/material/theme.properties +++ b/src/main/resources/templates/themes/material/theme.properties @@ -1,7 +1,7 @@ -theme.id=viosey.material +theme.id=viosey_material theme.name=Material theme.website=https://github.com/viosey/hexo-theme-material -theme.description=Nature, Pure | Ô­ÖÊ£¬´¿´â +theme.description=Nature, Pure | ԭ�ʣ����� theme.logo=https://avatars0.githubusercontent.com/u/8141232?s=460&v=4 theme.version=1.0 theme.author=Viosey