TransitionbyDesign / homemaker

GNU Affero General Public License v3.0
0 stars 1 forks source link

Turn Lucy's content overview into a website structure #19

Open wu-lee opened 4 years ago

wu-lee commented 4 years ago

This should be translatable into a forestry.io "schema". Or to put it another way, in order to build a forestry.io website editor which can be used to update and add content to the Homemaker site, we need to be able to list the components which make up the site and their attributes. There may be more than four components - i.e. more than just video, audio, map regions, and articles. For example, perhaps there would be pages, maps, relationships, etc., depending on how the site is planned to function.

An important consideration is that anything which is not editable via the forestry.io interface is likely to be hard to change once the initial development has passed.

For example, a very simple blog might have one component, call it an "Article". An article might have these attributes:

If you omitted the "Author" attribute, this would then mean the site has no concept of an author, or perhaps the author is hard-wired to some value which all posts have implicitly. Likewise, if you wanted a picture in an article, this is not provided for. Therefore it is important to make sure the forestry.io includes any elements like these if you want them to be editable later without re-hiring a developer to re-design the website source code.

Another important point is to be aware of forestry.io's limitations. If you want to have editable map pins, and forestry.io does not directly support clicking on a map to do this, then this would need to be accommodated some other way - perhaps by adding a field which can be used to enter lattitude/longitude coordinates.

wu-lee commented 4 years ago

How are regions defined?

How do we define them in forestry.io?

Are they a separate category, or can they be associated with any article/text/video posts, instead of a pin?

wu-lee commented 4 years ago

Looking at the kanban board here, I see various tags. Some are fairly obvious (I think), some not so much. Some may be mutually-exclusive alternatives (problem / solution? A vs B?), others just "flags" asserting something independent about the card.

Would you be able to explain them so that I can translate them into forestry.io data?

wu-lee commented 4 years ago

Current inferred structure as you can see on the forestrty.io page here. I've appended below a short summary extracted from the config files in the project.

Besides the general site data, the three type of content currently supported are

Note, "apposition" is my tentative name for the tag which can be "situation" or "solution", as in Q: "how is the post apposite to homelessness?" A: "It's a solution." I'm avoiding more generic terms like "type" simply because they're so commonly used everywhere and therefore tend to be harder to find in code and get mixed up. But maybe you have a better name for it?

The kind of questions I'm wondering are:


wu-lee commented 4 years ago

luckily I can extract the links directly from notion.so - and images possibly likewise when I encounter that case

It turns out that these links stop working after a day or so. I've updated the audio link in the draft so it works again - for now. But this won't work for longer than about a day as it is.

Therefore we need to discuss where to put media. This could be:

Charlie-TbD commented 4 years ago

Hello - an example https://www.dropbox.com/s/sjwrfemywy7gqrt/OxfordNorth.geojson?dl=0 is the GeoJSON region which is 7kb. Ideally we would be able to upload the geoJSON on a 'Regions' Forestry page (like you have audio or video pages in the forestry sidebar). It wouldn't show as a pin (there would be no lat/long entry). A user could click anywhere in the region. As the files are quite small I don't think storage is going to be that much of an issue.

wu-lee commented 4 years ago

Ok - do 'regions' have any associated properties, like text, solution/situation, etc? I would guess they need those, and so I'll need to include them, but: comments solicited.

Uploads on forestry all happen the same way: files get uploaded into the One True Assets Folder, then you can select them for fields which are of the type "file upload", but there's no filtering by type unfortunately. So you'd probably:

  1. Upload the GeoJSON
  2. Create a "Region" and choose the right GeoJSON file, plus set any other properties.

The other way (somewhat like all the media files) would be to host them somewhere else, then paste the URL into a text field for the "Region". Which is currently how I'm handling audio/video/images, but this is a point for discussion.

Charlie-TbD commented 4 years ago

They can have associated data in the data table (as shown for the one I sent before) but I think we'd just have the shape field and a name. Can talk about it in the morning. image

wu-lee commented 4 years ago

This issue now moot, since the structure inferred to get this far it is what it is. Summarised below.

It is declared in full in .forestry/frontmatter/templates/ and settings.yml. This directly defines the UI seen in on forestry.io. The code contains implicit assumptions about this structure, so they must be altered in concert with each other.

Note article, audio and video posts now all use the same fields (some optional), and they are distinguished by being stored in separate directories below content/.