All posts

Subtle changes

  • Applied the standard fix to the database to set everything to utf8mb4_general_ci. That made the ASCII art in the post about Astro routing work.
  • Renamed the database to admin2_ncvp_me_wp. Had to apply admin2_17926 user privileges to new database. I don't remember having to do that before.
  • Re-applied box-sizing: border-box to ncvp-class style.css. That fixed the overflowing thumbnails in image galleries - again.
  • Pushed ncvp-class - again.

There's so much to get right!

Categories & Tags

Categories and tags are the two default WordPress taxonomies used to organise content, with categories serving as broad, mandatory groupings (like topics in a library) and tags providing specific, optional keywords for granular details. Categories are hierarchical (parent/child), while tags are not.

In practice individual sites will have their own guidelines for how to use them.

Personally, I always assign a post to just one category, and add tags as required. But the perennial problem remains - is a map of the Roman empire in category 'Map' tagged with 'Roman Empire', or in category 'Roman Empire' tagged with 'Map?.

This video makes some interesting points:

Sort out astro-wpress routing

This is all about the mapping between site-url/xxxx/yyyy/zzzz and Astro pages. Even though there are no files in the /src/pages tree, the magic files [slug].astro, [...path].astro perform the same sort of rôle as if there were.

Add these to /src/:

└── pages
    ├── author
    │   └── [slug].astro
    ├── category
    │   └── [slug].astro
    ├── index.astro
    ├── [...path].astro
    ├── [slug].astro
    ├── tag
    │   └── [slug].astro
    └── [year]
        └── [month].astro

All this would have been impossible without AI assistance.

Source of media files

Move images and other media files which have to be loaded by URL to the cloud so the URLs don't have to be fiddled with as the site is copied around. Is it important that these external files come from SSL protected sites?

Here's one from wikimedia.org

Reduce canonical WP

Something basic with the master at localhost/wp/wp and distributed around to the various default cloud sites

Category: Admin
Rendered by content.php

Move away from block editor

Now it's clear that I don't need full site editing and only need the block editor for the Home and Blog pages, convert all other pages and posts to the classic editor.

Category: Admin
Rendered by content.php

Textflow using gallery shortcode

One way way of including images in a page of text is to put them in single image galleries. They can be made to pop out or not with the use of link="file" or link="none". Control over size is limited to Large, Medium or Thumbnail, but this is often sufficient. Some HTML is required to control the way images float to the left or the right. The thumbnail caption and the slide caption come from the 'Caption' and 'Alternative Text' fields in the media library respectively. There is no control over this. This text immediately preceeds the picture of Mathilde Wesendonck, which is set to pop out ...

... and this text immediately follows Mathilde.  Suspendisse iaculis sapien a rutrum molestie. Morbi non luctus nunc, vitae viverra est. Phasellus dapibus feugiat risus eu placerat. Vestibulum venenatis bibendum ipsum vitae sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nam fermentum tellus quis sollicitudin blandit. Vestibulum eget tortor at dui hendrerit dignissim ac at nibh. Phasellus vel laoreet augue, id interdum ex. In in ante sed elit suscipit vulputate. Phasellus ut egestas lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed condimentum eros, eget lobortis arcu. The image of Tiresias in the stars immediately follows this text, and is set to not pop out ...

... and this text immediately follows Tiresias. Aenean ultrices aliquam magna, eu facilisis lacus egestas eu. Maecenas ultrices nulla in convallis hendrerit. Aliquam posuere urna et enim faucibus, ac condimentum ipsum egestas. Ut viverra dolor in felis hendrerit euismod. Etiam molestie magna at egestas vulputate. Vestibulum rhoncus tortor consequat elementum pulvinar. Nulla elementum quam eget diam sagittis, vel porta odio ullamcorper. Curabitur pulvinar quis turpis non dignissim. In in sapien aliquet lectus laoreet pellentesque in eu enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. The image of Morgan le Fay immediately follows this text and is set to pop out ...

... and this is immediately after Morgan le Fay. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel massa tincidunt, aliquam elit id, venenatis tellus. Nunc molestie mauris et magna placerat tempus. Phasellus sodales dolor enim, vel eleifend ante facilisis semper. Integer vel dictum orci. Praesent cursus ligula vel nisi rutrum, sit amet mollis tortor euismod. Duis sollicitudin elit sit amet quam dictum congue.

Different menus on different pages

If these can be made to work smoothly I may not need a hybrid site, like my new garden, but look carefully at Planting Plans.
This may be another case like CAS membership form with payment where I can use a shortcode to basically dump code on a WP page and not worry about registering it.
Rendered by index.php