I called mine Colin but it doesn’t matter, the name of the template is defined in the included plist file. Using this, I created a folder inside the Documents file space. First I downloaded Documents which is a pimped out version of the Files app. This would let me see what the DOM looked like for each type of document.Ī decent start but how do I get this folder of web files loaded as a template in iA? There may be other ways to do this, but this is how I accomplished it. So I created an empty pre tag and listened to the injection event and then grabbed the contents and stuck them into the pre as textContent. Well to start with, I wasn’t even sure what the generated HTML would look like structurally. And they fire an event when the content has been injected into the document. Thankfully the templates can contain references to JavaScript files. Not only that, but I wanted to support both my final TOML based front matter files and my early draft format. But my template has a title in the header separate from the main content, and a banner image again outside the flow of the main document. The problem I had was that iA wants to dump all of my content into one spot. I cleared out all of the content from the sample page and added the data attributes required by the template. I edited the file in GoCoEdit which has been my coding editor of choice. If you want to read about the format of an iA Writer template there is a reference repository with examples and instructions. Then I created a file and added the HTML from my site. With this app, getting the source of one of my pages was easy.Īfter that I needed somewhere to put it so I created a new repo on GitHub and cloned it with Working Copy. Basically everything except the debugger. In particular I found and bought Inspect Browser which is essentially as much of the Chrome Dev tools as can run on the iPad. That proved to be tricky since Mobile Safari and other mainstream iOS browsers don’t let you view source. To start with I needed to grab a copy one of my rendered article pages. It wasn’t particularly hard but it was a bit tedious since I wrote the template on the iPad itself. Earlier I mentioned that I was going to try and create a custom preview for my blog articles.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |