Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,201
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
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
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,391

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: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,093
Website

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
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
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: 8,458
Website

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: 8,458
Website

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
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,201
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: 6,911
Website

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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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

Board footer

Powered by FluxBB