=== GazetteBuilder ===
Contributors: robertjbecraft
Donate link: https://metaphaze.com/gazettebuilder/support/
Tags: worldbuilding, custom post type, storytelling, timeline, lore
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.3
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

GazetteBuilder adds a dedicated content model for worldbuilding: entries, entry types, story progression, and relationships.

== Description ==

GazetteBuilder is a WordPress plugin for organizing worldbuilding content as structured, connected records. It is designed for lore databases, campaign setting reference sites, story-driven publishing, and timeline-based narrative content.

At its core, GazetteBuilder gives WordPress a dedicated model for entries, entry types, story progression, semantic references, and controlled relationship vocabulary.

= What it provides =

* A custom post type: `gazette_entry`
* A taxonomy: `gazette_entry_kind`
* A custom post type for relationship definitions: `gazette_relationship`
* Story-aware entry sequencing and release controls
* Semantic reference linking via `[[Target Entry]]`
* Timeline rendering based on timeline sort values
* ZIP-based import support for packaged lore content
* Public entry-type archive pages and filtered listing controls
* Admin screens for managing metadata, entry types, and relationship definitions

= Entries =

Entries are the primary content objects in the plugin. Each `gazette_entry` can carry metadata such as:

* Entry ID
* Entry Type
* Summary
* Campaign Date
* Story ID
* Sequence Position
* Release Date
* Timeline Sort
* Derived From
* Featured Media
* Unit label and continuation/ending text

Entries are edited through the standard WordPress admin interface, but they gain worldbuilding-specific metadata and behavior beyond a normal post.

= Entry Types =

Entry types are stored as taxonomy terms in `gazette_entry_kind`. The plugin can seed default kinds such as Location, Character, Organization, Culture, Technology, Creature, Vessel, Document, Artifact, Event, Reference, and Story. These terms are used to classify entries and can drive public archive indexes.

= Relationships =

GazetteBuilder supports a controlled relationship vocabulary for describing how one entry connects to another. Relationship types are defined as posts in `gazette_relationship` and include a relationship ID, canonical name, inverse label, source/target entry types, symmetry settings, multiple-relationship settings, and forward/inverse display rules.

Relationships are declared per Entry using the format:

`Relationship Name: Target Entry`

For example:

`Located in: Syrtis Major`
`Member of: Royal Geographical Society`

These declarations are resolved against actual Entries on the site. When a declaration resolves, the source Entry displays a forward relationship link, and the target Entry automatically displays a reverse (inverse) listing of every Entry that points to it, using the relationship's configured inverse label. No separate declaration is needed on the target Entry.

Reverse relationship listings are alphabetized with letter dividers and jump navigation, rendered in a multi-column layout. The number of columns is configurable from GazetteBuilder → Options (1-6, default 2).

= Story support =

Stories are built by organizing entries through a shared Story ID and sequence position. This allows the plugin to group sequential content into a story arc, expose landing and continue flow for readers, protect unreleased entries behind a release model, and redirect readers away from unavailable story steps.

= Semantic references =

GazetteBuilder supports inline semantic links using the syntax `[[Target Entry Name]]`. When a matching published entry exists and is release-eligible, the reference is rendered as a link. Otherwise it remains plain text or unresolved, depending on site configuration.

= Timeline and display features =

The plugin supports timeline-driven output with the `[gazette_timeline]` shortcode, including `types`, `min`, `max`, `orientation`, and `summary` attributes. Entries are included in published timelines when they have valid sort data, release visibility, and relevant metadata.

= Entry-type indexes =

For entry types marked as indexable, the plugin exposes public archives such as `/entry-type/location/` and `/entry-type/character/`, sortable by title or release date.

= Import workflow =

GazetteBuilder includes ZIP-based import support for packaged worldbuilding content, including Markdown entry files, media files, front matter metadata, story and release metadata, timeline sort values, semantic reference data, and relationship declarations. The importer validates packages before creating content and reports invalid input instead of silently importing broken data.

= Release model =

GazetteBuilder supports a release-aware visibility model: published Entries with no Release Date are immediately readable, future Release Dates keep otherwise published Entries hidden until they become available, and Story Entries redirect readers away from unavailable steps.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/gazettebuilder` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Flush or refresh permalinks after activation so rewrite rules are in place.
4. Open the GazetteBuilder admin screens and begin creating Entries, Entry Types, and Relationship Definitions.

== Frequently Asked Questions ==

= Does this replace the standard WordPress post editor? =

No. Entries use the standard WordPress editor, with additional GazetteBuilder metadata fields added to the edit screen.

= Can I control when an Entry becomes visible? =

Yes. Each Entry can have a Release Date. Entries with an empty release date are immediately readable; Entries with a future release date remain hidden until that time.

= How do I create relationships between Entries? =

Define a Relationship Definition from the GazetteBuilder → Relationship Definitions screen, then declare relationships on an Entry using the format `Relationship Name: Target Entry`.

= Can I import existing worldbuilding content? =

Yes. GazetteBuilder supports importing ZIP packages containing Markdown entry files, media, and front matter metadata from the GazetteBuilder → Import screen.

== Screenshots ==

1. GazetteBuilder Menu
2. Entries list
3. Entry editing screen with Entry Details
4. Entry Types
5. Relationship Definitions
6. Editing Relationship Definitions
7. Public semantic relationship/reference presentation
8. Timeline display 
9. Story landing/progression screen
10. ZIP Import preview/validation
11. GazetteBuilder Dashboard
12. GazetteBuilder Options
13. Missing Semantics
14. Not Published

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.


