-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Config) Make URL fixing optional #500
Comments
…rg#502 Implement Make URL fixing optional jbake-org#500 These two are hitting the same code, so it's hard to split them.
This is something I discussed with @manikmagar (in relation to #459) that image manipulation only needs to occur when content is duplicated on other URL's such as the feed or index page and a relative path has been used. We did talk about exposing a utility method to the template engines so you have more control over when the manipulation occurs as a potential solution. I'm working on a short term fix on #459 at the moment. |
…rg#502 Implement Make URL fixing optional jbake-org#500 These two are hitting the same code, so it's hard to split them.
imports cleanup. Final touches. Extract the title from the Texy documents. Improve hasHeader(): only scan first N lines, skip #... lines, skip blank lines, test against a regex; do not require status and type if defaults are set. Add DebugUtil with map printing, since JBake code uses maps heavily Wrap Crawler iteration into a try/catch Start refactoring MarkupEngine so it supports files without a header. Make DebugUtil more generic Improve MarkupEngine: Support no header if all values are known; Improve validation; Refactor. Extract title from Texy documents. Implement RawMarkupEngine: Extract title from the HTML; Normalize HTML; Pretty print HTML; Export as XHTML; Change exported charset; Introduce `input.charset`. Fix MarkupEngine - don't return headers map if the header separator is not found. Allow .-_ in the header names Refactor HtmlUtil#fixImageSourceUrls(). Keeps the same behavior. Fix jbake-org#499 file names encoding. Implements jbake-org#500 Make URL fixing optional jbake-org#500 Refactor createUri() and createNoExtensionUri() into one. Make index creation bit more readable (just reorder) Make index creation bit more readable (reuse the attrib name) Refactor Crawler#crawlSourceFile() logic around updating cache flag. Implement ContentStore#mergeDocument(Map<String, Object>) to update docs. Implement Make "relative <img src> points to assets" optional jbake-org#502 Implement Make URL fixing optional jbake-org#500 These two are hitting the same code, so it's hard to split them. MarkupUtil and RawMarkupUtil cleanup DebugUtil call Force normalize HTML files if they contain <body>. Rename vars Allow deduplication of title autodetected from the document's header - mark that header with a CSS class. Fix: Storing the altered DOM wrapped in <div> resulted in this <div> being serialized too. This removes it. Make innerXml more robust.
The URL manipulation done by this
is not always welcome.
/...
is simply intended to lead to the server root, out of JBake's scope;Where it is needed is the index page(s) or anywhere the document is rendered out of it's original place. However, JBake currently uses the same
content.body
for all cases.I'll make a PR.
What I see as potentially more useful could be image source references, something like Wicket has. Basically, the document refers to
/sourceId/my-image.jpg
and the framework translates that to the correct URI or URL.That can be leveraged in many ways. Example:
would make the framework fetch the image from Google and either put the URL or download and add to local images repo.
The text was updated successfully, but these errors were encountered: