mirror of https://github.com/halo-dev/halo
Update anatole theme.
parent
43bfa89dac
commit
c3c0daf7ed
|
@ -29,6 +29,7 @@ import run.halo.app.security.resolver.AuthenticationArgumentResolver;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Mvc configuration.
|
||||
|
@ -120,6 +121,11 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
|
|||
configurer.setTemplateLoaderPaths(FILE_PROTOCOL + haloProperties.getWorkDir() + "templates/", "classpath:/templates/");
|
||||
configurer.setDefaultEncoding("UTF-8");
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("auto_import","/common/macro/common_macro.ftl as common");
|
||||
|
||||
configurer.setFreemarkerSettings(properties);
|
||||
|
||||
// Predefine configuration
|
||||
freemarker.template.Configuration configuration = configurer.createConfiguration();
|
||||
if (haloProperties.isProductionEnv()) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class ContentArchiveController {
|
|||
* Render post archives page.
|
||||
*
|
||||
* @param model model
|
||||
* @return template path : theme/{theme}/archives.ftl
|
||||
* @return template path : themes/{theme}/archives.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String archives(Model model) {
|
||||
|
@ -77,7 +77,7 @@ public class ContentArchiveController {
|
|||
* Render post archives page.
|
||||
*
|
||||
* @param model model
|
||||
* @return template path : theme/{theme}/archives.ftl
|
||||
* @return template path : themes/{theme}/archives.ftl
|
||||
*/
|
||||
@GetMapping(value = "page/{page}")
|
||||
public String archives(Model model,
|
||||
|
@ -102,7 +102,7 @@ public class ContentArchiveController {
|
|||
* @param url post slug url.
|
||||
* @param cp comment page number
|
||||
* @param model model
|
||||
* @return template path: theme/{theme}/post.ftl
|
||||
* @return template path: themes/{theme}/post.ftl
|
||||
*/
|
||||
@GetMapping("{url}")
|
||||
public String post(@PathVariable("url") String url,
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ContentCategoryController {
|
|||
/**
|
||||
* Render category list page
|
||||
*
|
||||
* @return template path: theme/{theme}/categories.ftl
|
||||
* @return template path: themes/{theme}/categories.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String categories() {
|
||||
|
@ -61,7 +61,7 @@ public class ContentCategoryController {
|
|||
*
|
||||
* @param model model
|
||||
* @param slugName slugName
|
||||
* @return template path: theme/{theme}/category.ftl
|
||||
* @return template path: themes/{theme}/category.ftl
|
||||
*/
|
||||
@GetMapping(value = "{slugName}")
|
||||
public String categories(Model model,
|
||||
|
@ -75,7 +75,7 @@ public class ContentCategoryController {
|
|||
* @param model model
|
||||
* @param slugName slugName
|
||||
* @param page current page number
|
||||
* @return template path: theme/{theme}/category.ftl
|
||||
* @return template path: themes/{theme}/category.ftl
|
||||
*/
|
||||
@GetMapping("{slugName}/page/{page}")
|
||||
public String categories(Model model,
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ContentIndexController {
|
|||
* Render blog index
|
||||
*
|
||||
* @param model model
|
||||
* @return template path: /{theme}/post.ftl
|
||||
* @return template path: themes/{theme}/index.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String index(Model model) {
|
||||
|
@ -63,7 +63,7 @@ public class ContentIndexController {
|
|||
*
|
||||
* @param model model
|
||||
* @param page current page number
|
||||
* @return template path: /{theme}/post.ftl
|
||||
* @return template path: themes/{theme}/index.ftl
|
||||
*/
|
||||
@GetMapping(value = "page/{page}")
|
||||
public String index(Model model,
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ContentJournalController {
|
|||
* Render journal page.
|
||||
*
|
||||
* @param model model
|
||||
* @return template path: theme/{theme}/journal.ftl
|
||||
* @return template path: themes/{theme}/journals.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String journals(Model model) {
|
||||
|
@ -66,7 +66,7 @@ public class ContentJournalController {
|
|||
*
|
||||
* @param model model
|
||||
* @param page current page number
|
||||
* @return template path: theme/{theme}/journal.ftl
|
||||
* @return template path: themes/{theme}/journals.ftl
|
||||
*/
|
||||
@GetMapping(value = "page/{page}")
|
||||
public String journals(Model model,
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ContentSearchController {
|
|||
*
|
||||
* @param model model
|
||||
* @param keyword keyword
|
||||
* @return template path : themes/{theme}/search
|
||||
* @return template path : themes/{theme}/search.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String search(Model model,
|
||||
|
@ -61,7 +61,7 @@ public class ContentSearchController {
|
|||
*
|
||||
* @param model model
|
||||
* @param keyword keyword
|
||||
* @return template path :themes/{theme}/search
|
||||
* @return template path :themes/{theme}/search.ftl
|
||||
*/
|
||||
@GetMapping(value = "page/{page}")
|
||||
public String search(Model model,
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ContentSheetController {
|
|||
/**
|
||||
* Render photo page
|
||||
*
|
||||
* @return template path: themes/{theme}/gallery.ftl
|
||||
* @return template path: themes/{theme}/photos.ftl
|
||||
*/
|
||||
@GetMapping(value = "/photos")
|
||||
public String photos() {
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ContentTagController {
|
|||
/**
|
||||
* All of tags
|
||||
*
|
||||
* @return template path: themes/{theme}/tags
|
||||
* @return template path: themes/{theme}/tags.ftl
|
||||
*/
|
||||
@GetMapping
|
||||
public String tags() {
|
||||
|
@ -65,7 +65,7 @@ public class ContentTagController {
|
|||
*
|
||||
* @param model model
|
||||
* @param slugName slug name
|
||||
* @return template path: themes/{theme}/tag
|
||||
* @return template path: themes/{theme}/tag.ftl
|
||||
*/
|
||||
@GetMapping(value = "{slugName}")
|
||||
public String tags(Model model,
|
||||
|
@ -79,7 +79,7 @@ public class ContentTagController {
|
|||
* @param model model
|
||||
* @param slugName slug name
|
||||
* @param page current page
|
||||
* @return template path: themes/{theme}/tag
|
||||
* @return template path: themes/{theme}/tag.ftl
|
||||
*/
|
||||
@GetMapping(value = "{slugName}/page/{page}")
|
||||
public String tags(Model model,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<#macro comment post,type>
|
||||
<#if !post.disallowComment!false>
|
||||
<script src="//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/gh/halo-dev/halo-comment@1.0.0/dist/halo-comment.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/gh/halo-dev/halo-comment@1.0.2/dist/halo-comment.min.js"></script>
|
||||
<halo-comment id="${post.id}" type="${type}"/>
|
||||
</#if>
|
||||
</#macro>
|
|
@ -7,4 +7,4 @@ description: A other Halo theme
|
|||
logo: https://avatars1.githubusercontent.com/u/1811819?s=460&v=4
|
||||
website: https://github.com/halo-dev/halo-theme-anatole
|
||||
repo: https://github.com/halo-dev/halo-theme-anatole
|
||||
version: 1.0
|
||||
version: 1.0
|
||||
|
|
Loading…
Reference in New Issue