v79 / cantilever Goto Github PK
View Code? Open in Web Editor NEWCreating a cloud-first static website generator using AWS servers such as S3 and Lambda. Transforms markdown files into HTML.
Creating a cloud-first static website generator using AWS servers such as S3 and Lambda. Transforms markdown files into HTML.
The AWS cognito user pool IDs are hard-coded in the Authorizer. They should be externalised - environment variables for the API lambda execution.
I need to be able to add navigation links to the handlebars template models, so that I can create links between pages in templates. So that I can write links like this:
{{#if @previous }} <a href="{{ @previous.url }}">{{ @previous.title }} {{ @previous.date }}</a>
Required:
@previous
@next
@parent (only applicable for pages)
Other possibilities:
@FIRST
@last
@children (only applicable for pages)
@siblings (only applicable for pages)
I should be able to determine the values for these from posts.json
and pages.json
.
Will I ever need an API route to get these values, or can I just calculate them when processing the handlebars templates?
Implement a template chooser when creating new Pages.
After #56 URL generation has been broken and there is no url property in the ContentNode models.
Make url a calculated property for ContentNodes, with a URL generation strategy.
For pages:
For posts:
cantilever.yaml
as an override? Would need to define and parse a format string. Maybe based on Kotlin, e.g. "${date.year}-${date-month}/${slug}".Start with defining a default one, in any case.
OpenAPI 3.1 specification: https://swagger.io/specification/
StructureController, StructureManager all need to go. Structure stuff is now handled by separate JSON files for pages, posts, templates, media etc.
Currently we can only process templates that output HTML files. The Handlebars generator controller assumes that all templates have the file extension ".html.hbs". Extend this functionality to support other output formats, such as PDF or JSON.
Lambda is getting big. Can I move (and rewrite) the pages.json and posts.json generator into a new lambda?
A lot of values are currently hard-coded, such as folder paths. And there's nowhere to store project-level values such as website names.
Definite a project.yaml file. Create route for editing the project defintion, and a web UI for this. Create a UI for starting a new project.
Add error page configuration to cantilever.yaml.
Something like:
errorTemplates:
- 404: sources/templates/404.html.hbs
- 403: sources/templates/403.html.hbs
Do I need to explicitly define a Page for each of these errors as well? If not, how will I create a ContentNode.PageNode so that the template renderer can render the page? May just be a custom function. Maybe the template itself needs an isErrorPage
flag?
UI - on hover over an empty folder, show delete icon.
Backend - ensure folder is empty.
In order to detail the object schemas used in the OpenAPI specification, I need to know the fields/properties of the data classes. I can either do this through runtime reflection, or by compile-time code analysis.
I don't want to add reflection to the lambda runtime, so I should investigate using KSP to document the data class definitions.
In either case, I will need annotations.
The Structure Post class does not have a date field, just a lastUpdated field, which has a different purpose.
Syntax is supposed to be something like {{ localDate date "HH:mm dd/MM/yyyy" }} but that seems to be reverting to default. Why?
Define a standard for handling static file uploads. Initially just CSS files, but start the framework for other file types such as images.
I need to be able to add images to pages and posts.
See "adding images" for a fuller discussion of this.
The markdown syntax to include an image is something like:
![ description ] ( /images/my-cat.jpg "long description" )
Images will be uploaded to the source bucket (to /sources/images/). Details will be recorded in /generated/metadata.json
(or maybe a specific media.json
file). The images will then be converted/rescaled according to rules defined in cantilever.yaml
- specifically, new versions created according to the dimensions defined the "imageResolutions" project metadata. I.E. given an upload file of "my-cat.jpg", and imageResolutions of "small": "128x128" and "large": "640x", then new versions will be saved as "my-cat-small.jpg" and "my-cat-large.jpg" in the generated/images folder.
Probably also just do a straight copy of the file to generated/images
, so that it can be used as-is.
Ideally, I would only copy the required image resolutions to the destination web bucket. How might I do that?
GeneratorController queues files for regeneration. Display a more informative message when no files have been queued for generation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.