mirror of https://github.com/halo-dev/halo
Fix hasOptions bug
parent
e098e44d58
commit
81dea867eb
|
@ -52,7 +52,7 @@ public class ThemeProperty {
|
||||||
/**
|
/**
|
||||||
* Folder name.
|
* Folder name.
|
||||||
*/
|
*/
|
||||||
private String folderName;
|
private String themePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Has options.
|
* Has options.
|
||||||
|
|
|
@ -412,8 +412,8 @@ public class ThemeServiceImpl implements ThemeService {
|
||||||
themeProperty.setVersion(properties.getProperty("theme.version"));
|
themeProperty.setVersion(properties.getProperty("theme.version"));
|
||||||
themeProperty.setAuthor(properties.getProperty("theme.author"));
|
themeProperty.setAuthor(properties.getProperty("theme.author"));
|
||||||
themeProperty.setAuthorWebsite(properties.getProperty("theme.author.website"));
|
themeProperty.setAuthorWebsite(properties.getProperty("theme.author.website"));
|
||||||
themeProperty.setFolderName(themePath.getFileName().toString());
|
themeProperty.setThemePath(themePath.toString());
|
||||||
themeProperty.setHasOptions(hasOptions(propertyPath));
|
themeProperty.setHasOptions(hasOptions(themePath));
|
||||||
|
|
||||||
return themeProperty;
|
return themeProperty;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -435,6 +435,8 @@ public class ThemeServiceImpl implements ThemeService {
|
||||||
// Resolve the options path
|
// Resolve the options path
|
||||||
Path optionsPath = themePath.resolve(optionsName);
|
Path optionsPath = themePath.resolve(optionsName);
|
||||||
|
|
||||||
|
log.debug("Check options file for path: [{}]", optionsPath);
|
||||||
|
|
||||||
if (Files.exists(optionsPath)) {
|
if (Files.exists(optionsPath)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
theme.id=caicai.anatole
|
theme.id=caicai_anatole
|
||||||
theme.name=Anatole
|
theme.name=Anatole
|
||||||
theme.website=https://github.com/hi-caicai/farbox-theme-Anatole
|
theme.website=https://github.com/hi-caicai/farbox-theme-Anatole
|
||||||
theme.description=A other farbox theme
|
theme.description=A other farbox theme
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
theme.id=viosey.material
|
theme.id=viosey_material
|
||||||
theme.name=Material
|
theme.name=Material
|
||||||
theme.website=https://github.com/viosey/hexo-theme-material
|
theme.website=https://github.com/viosey/hexo-theme-material
|
||||||
theme.description=Nature, Pure | 原质,纯粹
|
theme.description=Nature, Pure | ԭ<EFBFBD>ʣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
theme.logo=https://avatars0.githubusercontent.com/u/8141232?s=460&v=4
|
theme.logo=https://avatars0.githubusercontent.com/u/8141232?s=460&v=4
|
||||||
theme.version=1.0
|
theme.version=1.0
|
||||||
theme.author=Viosey
|
theme.author=Viosey
|
||||||
|
|
Loading…
Reference in New Issue