Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

First step to issue #359, no change to the HTML output #361

Closed finanalyst closed 8 months ago

finanalyst commented 8 months ago
finanalyst commented 8 months ago

@dontlaugh may be this branch could be made into something like the docs-dev branch? Then you could make commits to it to access the sqlite database

finanalyst commented 8 months ago

@patrickbkr @dontlaugh the sqlite file created when this plugin is run during a build of the website is a valid database file. I tested it by installing sqlite3, opening it with no database, then running .read sqlite-db-definition.sql. A select * from routines generates all the data. limit the output as there are hundreds of rows.

dontlaugh commented 8 months ago

@dontlaugh may be this branch could be made into something like the docs-dev branch? Then you could make commits to it to access the sqlite database

No. I don't want to have another custom deployment branch.

finanalyst commented 8 months ago

@dontlaugh Attached is a zip of the sqlite file generated from a test collection of RakuDoc documents. I'm not sure what you mean by 'on the fly'. The PR here is a plugin that uses data collected during a build of the HTML site and formats it into a sql file. A similar dataset that can be reformatted is the data used for the search plugin. Is this what you mean by 'on the fly'?

Two things:

sqlite.zip

dontlaugh commented 8 months ago

What I mean is that I would prefer it if this PR contained one standalone SQL file with the following contents:

CREATE TABLE IF NOT EXISTS routines (
    Category TEXT,
    Name TEXT,
    Type TEXT,
    URL TEXT
);

-- future schema changes below...

This lets us test updates to database structure without invoking a build. I understand that this would yield an empty database. That's actually good, because schema changes will often necessitate changes to INSERT statements.

Could such a schema.sql could live next to the other plugin code?

finanalyst commented 8 months ago

@dontlaugh I am trying to understand this request. Are you saying that there should be two files, a schema file like the one above, and a data one with the INSERT ... lines? The build process would only generate the data file.

So we could have

I'll add commits to the branch to do this.