(2022-02-11) Moving TwinPages to FluxGarden
When building Backlinks natively in FluxGarden, rather than calling the WikiGraph wikigraph.net
widget, I left the TwinPages widget behind. (2021-05-30) Updating WikiGraph Backlinks in Real-time
But Neil Mather notes that I don't have SSL working for wikigraph.net
, so embedding the TwinPages widget means his pages get "mixed" content warnings.
Options
- get SSL working for
wikigraph.net
(which is running on ancient web.py)- probably would do that at LiNode, but could also move the whole thing to Digital Ocean, but I don't think that buys me much
- built the TwinPages widget into flux.garden which has SSL
- other?
I'll dig into moving-to-FluxGarden approach....
Schema:
- do I put all these remote pages into the
nodes
table, with nullbody
? Yes, I suppose- I have field
wiki_name
for the ID, andwiki_name_lower
(which includes dashes) for matching names
- I have field
- and each space goes into the
spaces
tableowner_id
? I think I'll assign them to me for now, and withprivacy='remote'
- I'll need to add a
page_pattern
field
- ok, alter
spaces
, then insert record forThoughtStorms
(id=39 on my laptop) - so
wiki_name
has to hold the URL (see esp NikitaVoloboev case with paths, sowiki_name = 'sharing/everything-I-know'
) - insert
ToolsForThought
forThoughtstorms
- set
spaces.page_pattern
for WebSeitzWiki- using local URL, will have to change in prod
- will have to change all spaces in prod
FluxGarden backlinks
code structure
backlinks()
function returns list, page template renders (note that this is a simple flat list, simpler than TwinPages will be)
So code plan for TwinPages is
twinpages()
function to return data- search on
lower(referer) == wiki_name_lower
, returnwiki_name
?
- search on
- render that in page template
- add
twinpages.js()
route withtwinpages_js()
function to take the data and render as JavaScript
Feb13 have local rendering working with ThoughtStorms
case
insert local record for DoubleLoop to confirm messier pattern works (id=40)
- Feb15: works
Nikita, who has paths for his pages - will do Nuclear Energy
- Feb15: works
next: JavaScript widget
- Feb15 works if I hit the JS URL directly http://flux2.garden:5000/twinpages.js
- but doesn't render in the page, though I see it get called
Edited: | Tweet this! | Search Twitter for discussion