-
Notifications
You must be signed in to change notification settings - Fork 17
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
Set up docs self-hosting #162
Comments
cough Textpattern instance with smd_ebooks for creating offline content cough (The plugin will need tweaking for 4.8) Honestly I can't see anything in Jekyll we can't do better or more efficiently in Txp. We have articles in sections, permlinks, markup, better search, header/footer, includes that are more flexible via forms and shortcodes, ... Run the Jekyll pages through pandoc to convert from Markdown to Textile, or install Markdown as a textfilter and just port the content as-is. If we can squirt collaborative changes from the GitHub repo to the Txp filesystem to rebuild the DB as part of a git post-commit hook or CI pipeline, we should be able to rebuild the changed docs with some script-fu. |
@Bloke - I'm inclined to agree. I'm learning CI + Pandoc at the moment, so we'll see what the new year brings. |
Considering the relatively low volume of docs content (and let's recognize that as by design), and the greater control Txp would provide over includes, URL redirecting, etc. I have to agree. You could even do a flat-file site and keep it under version control. Version control is a nice thing, actually. I don't think it's important to convert Markdown back to Textile, since we already went through that dance of going the other way. Screw that. Just add wet_markdown and use Textile for new docs only, if that's really a big deal. That said, I don't want anything to do with the actual migration process. I know I've been in 'beast-mode', as Pete put it recently, but I'm just trying to make up for where I dropped the ball a few years back, get broken/lagging docs completed and improved. And I recognize some other editorial needs I'm happy to give attention to, to stabilize. But I'm aiming to get back to much less 'beast-mode', as it were. My objective here is get the content architecture square and then put myself on editor cruise-control so that I can return energy to my own writing. So as long as this doesn't create any additional work for me that I haven't already shouldered myself, I have no objections. |
Thanks @wion - I do not want to create any additional work for anyone, and certainly not undo any work done. |
So.. you'd need to:
If those hurdles can be overcome, I'm interested. |
This is what's keeping me away from Textpattern as-is. On the one hand - yes - CMS, and we're literally managing content here, but on other hand, it doesn't feel like the right tool for the job. Something more automated would be better, I think - even a self-hosted Jekyll in the first instance would be minimal effort to get going an replicate the GitHub delivery but with redirect trimmings and other stuff. Flat files, static site generator, version control baked-in, make it wicked-fast, spit out compiled versions (EPUB, PDF, MOBI, etc) as part of the GitHub CI job, rinse and repeat. (Edit: just my 2c, of course.) |
Suits me fine. If self-hosted Jekyll (or equivalent) is an option then go for it. I only mentioned Txp since it seemed like a good fit, but I'm by no means married to the idea if the obstacles are less than optimal to overcome. Go with whatever is easiest, most flexible and allows us to retain version control. |
Sounds fine to me too, would be handy to use proper Jekyll plugins and proper SSL, redirects, etc. instead of the locked-down GitHub Pages version of Jekyll. I have no idea how best to achieve that but a quick web search brings this... https://styxit.com/2017/09/13/self-host-github-pages-on-digital-ocean.html If someone wants to have a stab at it then please go ahead. :) |
Dibs. Won't be for a while, but I'll take it. |
Short-term (before we potentially move to self-hosted Jekyll), GitHub now allows you more control over your Jekyll site as long as you deploy with GitHub Actions. See https://jekyllrb.com/docs/continuous-integration/github-actions/ This now allows for third-party Ruby plugins and other customisations over and above the restricted GItHub Pages builds. Will investigate at some point in the future. |
Folding this in so I can close it: #79 |
OK, I've got the docs site running self-hosted on my local machine again (been a few years since I last hosted a Jekyll site so I had to install latest Ruby and various Gems again from scratch on my Mac). I've created a branch on this repo called |
Nice one! Yeah, the more control we have over Jekyll and Liquid, the better it is for automation of repetitive, boring template stuff. |
OK, I have done the self hosting stuff needed to run Jekyll. As a rough test I have gone into our Textpattern server and git cloned the repo into the For now the site is running at https://jekyll.textpattern.com/textpattern.github.io/_site/ Seems to be some Content Security Policy issues that need to be fixed by @petecooper so the domain can read CSS and JS from textpattern.com domain. I haven't been able to check the search works yet either due to JS reliance. Once we are happy this works as we want (after some testing in-situ), we then need to investigate how to automagically...
Other considerations:
Over to you for now. |
Also I might add, at the moment because the file structure sits at |
Done - CSS, JS, images, fonts. |
+1. Leaving it as
If you can email me the stuff you ran on the server to make the build happen, I'll have a look at the best scaffold from a maintainability and backups point of view. It's trivial to repoint an Nginx config to look at a certain dir, so no worries there. |
Jekyll test site now running off the root: https://jekyll.textpattern.com |
From my side of things, I need to have a play with the rebuild process on a test server, then I think we're nearly there with hosting the docs ourselves. I don't have cods of time this week, so it might end up being evenings and weekend, but we're close. @philwareham - if you're largely done from your end, are you comfortable for me to temporarily disable the site at an agreed time so we don't dilute SERPs etc with duplicate docs from this test site? |
CSP for the Jekyll test site needs a couple of amends, which I have just committed to the server-config repo. Can you update on server @petecooper? Thanks. Also some links don't seem to be working on the docs site on server, although they work fine in my local build, so maybe something needs adjusting on server side? For example: https://jekyll.textpattern.com/tags/article gives a 404 error at the moment. |
Back in office around 4pm, will sort.
…--
Pete Cooper
pete@pragmatika.net
On 15 Jul 2020, at 12:55, Phil Wareham ***@***.***> wrote:
CSP for the Jekyll test site needs a couple of amends, which I have just committed to the server-config repo. Can you update on server @petecooper? Thanks.
Also some links don't seem to be working on the docs site on server, although they work fine in my local build so. maybe something needs adjusting on server side? For example: https://jekyll.textpattern.com/tags/article gives a 404 error at the moment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The Markdown files aren't being transformed into HTML, so it's 404-ing. Aside: I've fixed permissions (should be |
@philwareham - it looks like jQuery is needed for search - at the moment Jekyll is calling from |
We should serve locally. Can you raise an issue and I'll sort it soon. Ta! |
Another issue: 404s should use Currently it's just using the Nginx default 404 (example https://jekyll.textpattern.com/tags/expiresffsf) |
Done. |
Now I've fixed the jQuery issue mentioned above, I can't see any further issues in the Jekyll site running on the server, so I think my part is done. The final piece of the puzzle is to detect when a commit is made to the repo on GitHub, |
Just wondered where we are at with this? No rush though, just curious. |
Realistically September, I think. My business is badly affected by COVID stuff and 90%+ of my work has evaporated, so I'm having to juggle a few things around this to make sure rent is paid etc. Not forgotten. I've got all your notes on self-hosting stored safely, thanks to your sterling efforts on Jekyll, so should be straightforward enough when I get around to it. May end up being part of the server rebuild with latest Ubuntu long term support version, plus some other bits and pieces. |
Long out of the loop. Sorry. Just curious if we lose repo versioning user docs when going to a self hosted install. |
Nope. Repo operations won't change. The publishing target (?) will, so we'll have more control over it and be able to do more stuff, but no functionality is taken away. |
Still github or something else? |
Okay, I see. Thanks. |
Still GitHub. Still all the same stuff here, perhaps a repo name change to reflect the move away from GitHub publishing infra, but we'll be running a self-hosted Jekyll with all the trimmings we need, which is a conscious move to not reinvent the wheel etc. |
Initial commentary on beta site linked in #162 (comment) – subject to change. The build appears to work OK, but we have an issue with
Not a deal breaker, as far as I can tell, but something to be aware of. For now, I'm going to set up a regular Search appears to be a little faster on self-hosted Jekyll. Still not stellar but we can faff with that after the other stuff is sorted. The Nginx config is a little different to PHP web apps, but easily managed. |
To do:
|
FYI docs site is now self-hosted. It's not pretty behind the scenes – but it works, it's automated, and we have some snagging to fix re: deprecated and EOL gems. I'll start another issue for each of those items. |
There's a growing need for self-hosting of docs for enhanced flexibility (see also #79).
Dibs. R&D phase.
The text was updated successfully, but these errors were encountered: