- Serve Markdown files for
.mdextensions (see #generating-markdown)- See how we do it at Rivet by copying
.mdxto the public folder in Next.js
- See how we do it at Rivet by copying
- Log in to the Cloudflare Dashboard
.md extensions (see #generating-markdown)
.mdx to the public folder in Next.jsThis script will import Markdown files from a folder. It will only import files ending in .md, so it skips folders and images. This will use the file name as the note name. If there is a H1 on the first line, it will remove that line and trim the file in order to remove redundancy.
Developer > Toggle Developer Tools.path/to/folder/with/markdown/files/ with a path to the folder with the markdown files in it. Make sure to include the trailing "/".| import Fluent | |
| import Authentication | |
| /// Copy of `TokenAuthenticationMiddleware` middleware that uses classified tokens. This way, objects can use | |
| /// private and public tokens. | |
| public final class ClassifiedTokenAuthenticationMiddleware<U: TokenAuthenticatable>: Middleware { | |
| public let isPrivate: Bool | |
| public init(_ userType: U.Type = U.self, isPrivate: Bool) { | |
| self.isPrivate = isPrivate |
| -- In setup | |
| iapItems = {} | |
| registerItem("itemIDOne") | |
| registerItem("itemIDTwo") | |
| initStore() | |
| storeReady = false | |
| purchasePending = false | |
| -- Purchasing the item | |
| purchaseItem(itemNum) -- Number of the item registered in order; i.e. 0 would be 'itemIDOne' and 1 would be 'itemIDTwo' |
| Math.lerp = function(a,b,f) { | |
| return Number(a) + f * (Number(b) - Number(a)); | |
| } | |
| Math.radians = function(degrees) { | |
| return degrees * Math.PI / 180; | |
| }; | |
| Math.degrees = function(radians) { | |
| return radians * 180 / Math.PI; |
| --# Main | |
| displayMode(FULLSCREEN_NO_BUTTONS) | |
| supportedOrientations(LANDSCAPE_ANY) | |
| function setup() | |
| AssetLoader:init( | |
| { | |
| KAStar = "star.png", | |
| KAPuff = "puff.png", |
| --# Main | |
| function setup() | |
| m = mesh() | |
| m.visible = true | |
| fragments = {} | |
| parameter.number("meshScale",10,400,150) |
| --# Main | |
| displayMode(FULLSCREEN_NO_BUTTONS) | |
| function setup() | |
| parameter.boolean("rotateCamera",true) | |
| lastScore = readLocalData("lastScore",0) | |
| highscore = readLocalData("highscore",0) | |
| StateMachine:init() |
| --# Main | |
| displayMode(FULLSCREEN) | |
| supportedOrientations(PORTRAIT_ANY) | |
| function setup() | |
| bg = getGradient(vec2(WIDTH,HEIGHT),color(0,90,255),color(50,190,255)) | |
| Game:init() | |
| end |