Is GitHub useful for TW5? (philosophy)

197 views
Skip to first unread message

JWHoneycutt

unread,
Jan 29, 2020, 8:16:06 PM1/29/20
to TiddlyWiki
I have a basic question regarding GitHub, and how TW5 works with it. The question is more basic than "commits and merges", maybe closer to philosophy. 

This is how I use TW5:
My file is a single HTML residing on Dropbox (say..."Fruit.html"), and synched to my laptop's hard drive. I use TiddlyDesktop to access it, and my backups stack up with every save in the folder "Fruit.html_backup".

My goal is to learn GitHub while continuing work on TW5, and update to a website, such as a personal blog. I have read that Github Pages could allow GitHub to host static web pages ("easily"). I have also read that adding Jekyll provides dynamic webpage functionality.

So I did set up a personal (private) GitHub account. I could not get (Control Panel / Saving / GitHub Saver - https://tiddlywiki.com#Saving%20to%20a%20Git%20service) to save Fruit.html into my repository. So I used Github's Upload Files button and brought Fruit.html into my repository (maybe it has to be done that way the first time?)

Now, I can't RUN and update my Fruit.html from within GitHub - right? GitHub doesn't RUN anything?

Is it just a "repository" that only stores the results of my efforts (Dropbox via TiddlyDesktop) - right?

If that is true, the value (to me) of GitHub over Dropbox is quite limited, since I have all my history already. I am not doing any collaborating with others on my wiki (at least not yet).

Maybe the ability to place my TW5 efforts into web pages deserves Github, but I could manually move them (FileZilla onto DreamHost), although GitHub Pages may be much easier.

Any input is appreciated.

JWHoneycutt

Mark S.

unread,
Jan 30, 2020, 11:52:33 AM1/30/20
to TiddlyWiki
Using the github saver probably won't teach you much about github.

The saver does work, but you have to be sure to fill in the "path" field even if you are using the root directory. For the root, use "/". This is unclear in the instructions.

The website publication option is interesting, but kind of a whole different subset of github. It allows you to produce a website using HTML and markdown, and the jekyll adds dynamic ability.
But if you're using TW, you already have dynamic ability.

You can combine the two aspects, so that you save your TW file to your own *.io website automatically. This means you could, in theory, sit down at
any browser in the world and access your own TW website. Since github is a MS product, it is more likely to be available even in facilities
that block youtube and gmail.  The problem is that the whole world can also see your site, so it may not be so good if you're recording private information
such as names and addresses.

You can save to your own private directory, but you can't publish as a website from there, so if you were
sitting down at a new computer you would have to start by downloading the last committed instance of your tw file
from the github site.

So, the github saver is basically another saver. It's probably a good approach if you have a TW file that you want to conveniently
access and share with the world. But be sure to use a github token, and not a password, when setting it up.  Also
remember that there is no real deleting with github. Each "commit" is stored forever, AFAIK.

Jeremy Ruston

unread,
Jan 30, 2020, 12:03:14 PM1/30/20
to TiddlyWiki
Hi Mark


On 30 Jan 2020, at 16:52, 'Mark S.' via TiddlyWiki <tiddl...@googlegroups.com> wrote:

The saver does work, but you have to be sure to fill in the "path" field even if you are using the root directory. For the root, use "/". This is unclear in the instructions.

I’ve pushed an update that defaults the path to “/“ if it is left blank for both the GitHub and GitLab savers.

Best wishes

Jeremy
Message has been deleted

JWHoneycutt

unread,
Feb 2, 2020, 4:57:29 PM2/2/20
to TiddlyWiki


On Sunday, February 2, 2020 at 4:55:45 PM UTC-5, JWHoneycutt wrote:

@Mark S. - thank you

I clearly had some misunderstandings about GitHub, and probably still do. I think I have learned:

GitHub Pages is a particular (Public-only) published application from within GitHub that will update to a website hosted by GitHub Pages. Using TW5 from within it will update the website, allowing you to access it from any internet connected machine with a browser.

Tiddlywiki version 5.1.20 created the GitHub Saver module inside Control Panel. Per Jeremy Ruston's response, the default path being set to `/` is either not necessary now, or will be in the next update (5.1.22 ?)

Despite trying every combination I an think of, I can not get the GitHub saver to not give me an "XMLHttpRequest error code: 401" 

Settings: 
Username: jwhoneycutt
personal access token: (big long thing)
Target repository (e.g. Jermolene/TiddlyWiki5)jwhoneycutt/jwhoneycutt.github.io OR jwhoneycutt.github.io -> for some reason, keeps "resetting" to jwhoneycutt`/`github.io
Target branch for saving master
Path to target file (e.g. /wiki/) / (or not)
Filename of target file (e.g. index.html) index.html
Server API URL https://api.github.com

Is there a simple syntax error preventing me from using GitHub saver inside the $:/ControlPanel? 

JWH

Mark S.

unread,
Feb 2, 2020, 5:17:20 PM2/2/20
to TiddlyWiki
Are you browsing the file on the io site, or as your local download? I think, and I could be wrong, that you should open the io site index.html file for browsing, make your "save" entries, and then save.

JWHoneycutt

unread,
Feb 2, 2020, 6:00:37 PM2/2/20
to TiddlyWiki
@Mark S. - thank you

When I am "In" GitHub, looking at my repositories, and click into my github.io repository, I see index.html
Double clicking index.html does not open it: I get "View Raw: (Sorry about that, but we can’t show files that are this big right now.)

When I go to https://jwhoneycutt.github.io/index.html using a browser, I do see the TW5 file, and it loads the favicon in my Chrome browser tab
I can read anything in my wiki. When I write a new tiddler title:"2020-02-02 5:57pm", and Save changes, it saves it to my downloads folder on my hard drive

Neither changes the wiki in my repository.

JWH

JWHoneycutt

unread,
Feb 2, 2020, 6:08:01 PM2/2/20
to TiddlyWiki
Should my path be "/blob/" ?


Mark S.

unread,
Feb 2, 2020, 7:08:33 PM2/2/20
to TiddlyWiki


On Sunday, February 2, 2020 at 3:00:37 PM UTC-8, JWHoneycutt wrote:
@Mark S. - thank you

When I go to https://jwhoneycutt.github.io/index.html using a browser, I do see the TW5 file, and it loads the favicon in my Chrome browser tab
I can read anything in my wiki. When I write a new tiddler title:"2020-02-02 5:57pm", and Save changes, it saves it to my downloads folder on my hard drive

Mohammad

unread,
Feb 2, 2020, 11:40:11 PM2/2/20
to tiddl...@googlegroups.com
Hi JWH,

These are working example and tutorial to setup TW on GitHub

Reply all
Reply to author
Forward
0 new messages