Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-11-15 18:48:48

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Offline Documentation

I work in a secure non-connected environment now.

How do I build textpattern documentation site for offline viewing?

I’d settle for a PDF version of the documentation.

Offline

#2 2018-11-15 20:14:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Offline Documentation

Hi Mr Dale. Nice to see you again !

You can download the complete docs from GitHub repo. They are in markdown format, so it needs some converting to turn into a useful PDF file. You may be able to use some doc build software to make it into a self-contained website.

Another possibility is something like converting for use with Dash or similar. There are some docs on doing that from HTML files but there is certainly some work involved…

Another option: scrape it into a self-contained website using something like Sitesucker.

I’m sure plenty of people would be pleased to see that, so share if you can!

EDIT: Yet another option: use the build script Phil and Stef have been using to make it!


TXP Builders – finely-crafted code, design and txp

Offline

#3 2018-11-15 21:00:32

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Offline Documentation

Hi mrdale. With the Download Manager of the iCab Browser you can download the whole docs.textpattern.com/tags/ set.

Offline

#4 2018-11-16 07:12:32

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Offline Documentation

You can build the site locally with Jekyll from the command line by cloning the repo. Other than that, there must be a solution for converting Markdown to PDF and I’d love to provide that as a download.

Need to investigate further.

Offline

#5 2018-11-16 11:14:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Offline Documentation

philwareham wrote #315284:

There must be a solution for converting Markdown to PDF and I’d love to provide that as a download.

Pandoc will do that (and a lot more). See #13 here, however AFAIR we have YAML blocks at the top of the markdown pages so there’s always some “gunge” at the top of each page.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2018-11-16 11:46:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Offline Documentation

jakob wrote #315303:

Pandoc will do that

I was going to suggest that tool as it’s terrific. But how you’d turn “the docs” (website) into a single PDF will be tough.

For individual groups of things (such as the tag reference), the trick will be getting the content pre-parsed into a suitable format without the YAML blocks, as you say. A bit of clever scripting would probably be able to hack that out and maybe consolidate the set into a single file ready for Pandoc to convert.

It does, however, apparently handle multiple input files to one output file (e.g. pandoc *.md -o output.pdf) so I wonder if it’s possible to write a simple filter to strip out the crap in each file between read and write phases.

Last edited by Bloke (2018-11-16 11:47:01)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2018-11-16 11:50:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Offline Documentation

Incidentally, to directly address mrdale’s initial query, if you were on PC I’d suggest httrack.

The other option – depending if you have XCode installed and all the dependencies and some luck – is to build wget yourself with SSL support. Then you should be able use wget to mirror the site.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2018-11-16 19:29:20

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Offline Documentation

Thanks all!

Good to chat after a bit of a hiatus. For those of you who do not know, I accepted a job as a digital design instructor in prison and I totally love it. Teaching Creative Suite through atom/css3/SASS/html5 and just a tiny bit about CMSs/php/mysql. Txp is a good fit.

Initially I had tried sitesucker, which did not give me the assets folder. I eventually got past this by sucking textpattern.com in it’s entirety down, then placing them in adjacent folders. Now it seems to work.

I know nothing about jeckyl, but since I downloaded the project from github, I’ll look into it…

Pandoc seems like a good fit to make a PDF.

What cms is the docs site built with? If it is a TXP site, it would be ideal to be able to deploy the site so that the search function works. I guess that would require a database dump.

Offline

#9 2018-11-16 21:08:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Offline Documentation

mrdale wrote #315324:

What cms is the docs site built with?

Good question! Whatever is updated on github, the change is appearing directly in the docs site.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2018-11-16 21:13:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Offline Documentation

The docs site is all Jekyll pages. As far as I know, within a minute of making changes to the GitHub repo, a background job gets triggered and rebuilds the page.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2018-11-16 21:40:49

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
Website

Re: Offline Documentation

Doesn’t Jekyll’s build process generate a folder full of static html pages?

If so, presumably zipping that up for download would provide a self-contained offline resource? Or would it require a local web server?


TXP Builders – finely-crafted code, design and txp

Offline

#12 2018-11-17 10:10:54

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Offline Documentation

Yes I used Jekyll for the site as that is what runs GitHub Pages. You can build a working local site from the repo if you run a few command line instructions.

I would, however, need to do a few things to get it working offline – change the URLs to relative URLs (which is probably a good thing anyway) and bundle the CSS and JavaScript (as it uses those directly from our main site for my ease of development).

I can look at some of the above next week sometime.

Another thing worth considering is offline storage. Not sure that helps Dale directly as it still needs at least one initial connection to internet. However it’s helpful for other situations where you are offline. I’ve dabbled with it but it’s quite complex for me due to my limited JacaScript skills. Any help on this greatly appreciated.

Offline

Board footer

Powered by FluxBB