private String createNoExtensionUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + FileUtil.URI_SEPARATOR_CHAR + "index" + config.getOutputExtension(); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Missing UTF-8 encoding??", e); // Won't happen unless JDK is broken. } }
private String createUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + config.getOutputExtension(); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Missing UTF-8 encoding??", e); // Won't happen unless JDK is broken. } }
/** * Constructor added due to known use of a allInOneName which is used for name, template and content * * @param allInOneName */ public DefaultRenderingConfig(String allInOneName) { this(new File(config.getDestinationFolder().getPath() + File.separator + allInOneName + config.getOutputExtension()), allInOneName); }
model.put("content", map); File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + tag + config.getOutputExtension()); map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path)); model.put("content", map); File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + "index" + config.getOutputExtension()); map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path)); render(new ModelRenderingConfig(path, "tagindex", model, findTemplateName("tagsindex")));
private String createUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + config.getOutputExtension(); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Missing UTF-8 encoding??", e); // Won't happen unless JDK is broken. } }
/** * Constructor added due to known use of a allInOneName which is used for name, template and content * * @param allInOneName */ public DefaultRenderingConfig(String allInOneName) { this(new File(config.getDestinationFolder().getPath() + File.separator + allInOneName + config.getOutputExtension()), allInOneName); }
private String createNoExtensionUri(String uri) { try { return FileUtil.URI_SEPARATOR_CHAR + FilenameUtils.getPath(uri) + URLEncoder.encode(FilenameUtils.getBaseName(uri), StandardCharsets.UTF_8.name()) + FileUtil.URI_SEPARATOR_CHAR + "index" + config.getOutputExtension(); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Missing UTF-8 encoding??", e); // Won't happen unless JDK is broken. } }
model.put("content", map); File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + tag + config.getOutputExtension()); map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path)); model.put("content", map); File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + "index" + config.getOutputExtension()); map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path)); render(new ModelRenderingConfig(path, "tagindex", model, findTemplateName("tagsindex")));