Skip to content
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

Subsume and reanimate tiddlyspot.com #100

Merged
merged 7 commits into from
Mar 25, 2021
Merged

Subsume and reanimate tiddlyspot.com #100

merged 7 commits into from
Mar 25, 2021

Conversation

simonbaird
Copy link
Collaborator

@simonbaird simonbaird commented Mar 19, 2021

It's ambitious, but I think it can work.

Now:

  • Support serve public site and private sites with basic http auth like they are now.
  • Support updates for Tiddlyspot sites using the upload plugin user/pass (like it was before)
  • Allow Tiddlyhost users to claim ownership of Tiddlyspot sites by knowing the password.
  • Move the DNS for tiddlyspot over to tiddlyhost's IP address so the above becomes active.

Later:

  • Allow Tiddlyhost users to manage settings for Tiddlyspot sites, e.g. changing password, changing private/public setting, adding tags and a description, including in the hub, etc.

#90

(Not sure how many people will care about reviving their Tiddlyspot site, but it's an interesting challenge and I'm having fun with it. :)

@simonbaird simonbaird force-pushed the tiddlyspot branch 2 times, most recently from 8b555f5 to eb31929 Compare March 24, 2021 18:48
@simonbaird simonbaird changed the title Support serving tiddlyspot.com Subsume and reanimate tiddlyspot.com Mar 24, 2021
Actually it required some manual intervention to make this work
since ansible doesn't try to create the cert if the cert file exists
already.

Also I revoked the existing certs before creating this one, which
was done manually as well.
Includes:
- Add the current tiddlyspot "recovery mode" home page,
  converted to HAML and with a controller action to serve it.
- Add the old tiddlyspot favicon
- Additional settings and settings methods related to domains
  and hostnames.
- Small refactor related to www redirects.
- Tweak existing redirect test to use hosts! since I just learned
  about that technique.
- Some additional nginx config for proxying tiddlyspot requests

Notes:
- I was originally attempting to make nginx refuse SSL requests
  entirely for tiddlyspot, but it seems like it can't be done.
  (Could maybe do that in rails routing, but let's think about
  it later).
- I'm testing this locally, but it won't be active in production
  until the real DNS gets switched over.
- Serving tiddlyspot sites is coming soon, but not included in this
  commit.
Also some code and credentials for fetching site files from the the
S3 compatible bucket at Dreamhost that contains all legacy
tiddlyspot site files.

Note:
- I've included some fields that won't be used right away, in
  particular description and is_searchable.

- I did go back and forth on whether to use the same schema
  for Site and TspotSite. Decided to keep them separate because:
  - It avoid resource routing annoyances
  - They are actually quite different conceptually
  - We can share common code using mixins as required rather
    than inheritance, (and that's usually better).
  There are some downsides though, e.g. The user.all_sites is
  and preparing stats on all sites is not pleasant, (though
  maybe we can come up with something later to improve it.)

- Added tags for tiddlyspot sites for future use. They're not
  currently exposed to users.
Actions for:
- Serve site and download (with basic authentication
  for private sites)
- Save (uses active storage like a regular tiddlyhost site)

Also:
- Refactor some methods for incrementing counters and touching
  timestamps
Also remove the extra "Owner" name field in existing sites list.

Could maybe refactor to reduce duplication between the two different
site lists, but let's worry about it later.
Add an icon to help distinguish between the two types of site, and
enough duck typing to get by.

There's not much in the action menu currently for tiddlyspot sites,
but more will come later.
If you know the password for an existing tiddlyspot site you can
claim it as your own and it will appear in your sites list.

Also:
- Introduce mock_helper method and use it in existing
  tspot_fetcher_test
- Fix a typo in the redirect in sites controlller.
- Tweak the selector for the name field validation jquery
@simonbaird
Copy link
Collaborator Author

I've been working and re-working this for a while. I think it's ready to push out of the nest. Just now I deployed it and switched over the DNS for tiddlyspot.com. So far so good I think...? Let's merge before I get tempted to mess with further. Further fixes and improvements can be tracked separately.

@simonbaird simonbaird merged commit 1afeb32 into main Mar 25, 2021
@simonbaird simonbaird deleted the tiddlyspot branch March 25, 2021 19:34
simonbaird added a commit that referenced this pull request Apr 3, 2021
Subsume and reanimate tiddlyspot.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant