Documentation ¶
Index ¶
- Constants
- Variables
- type Input
- type Output
- func (o *Output) AbsFilePath(typ string, args ...string) string
- func (o *Output) AbsPath(p string) string
- func (o *Output) AbsPathFromLink(l string) string
- func (o *Output) FileLink(linkType string, args ...string) (s string)
- func (o *Output) FilePath(typ string, args ...string) string
- func (o *Output) LinkFromPath(p string) string
- func (o *Output) ParseDocReference(ref string) (scheme, path, link string)
- func (o *Output) PathFromLink(l string) string
- type Settings
Constants ¶
const ( ToolName = "rbxapiref" FileName = "settings.json" )
const ( ArchiveURL = "https://raw.githubusercontent.com/RobloxAPI/archive/master/" CDNURL = "https://setup.rbxcdn.com/" DevHubURL = "developer.roblox.com/api-reference" )
const ( ClassPath = "class" EnumPath = "enum" TypePath = "type" FileExt = ".html" MemberAnchorPrefix = "member-" SectionAnchorPrefix = "section-" MainTitle = "Roblox API Reference" TitleSep = "-" )
Variables ¶
var Default = &Settings{ Input: Input{ Resources: "resources", Templates: "templates", }, Output: Output{ Root: ".", Sub: "ref", Resources: "res", DocResources: "docres", Manifest: "manifest", }, Build: builds.Settings{ Configs: map[string]fetch.Config{ "Archive": { Builds: fetch.NewLocations(ArchiveURL + "builds.json"), Latest: fetch.NewLocations(ArchiveURL + "latest.json"), APIDump: fetch.NewLocations(ArchiveURL + "data/api-dump/json/$HASH.json"), ReflectionMetadata: fetch.NewLocations(ArchiveURL + "data/reflection-metadata/xml/$HASH.xml"), ExplorerIcons: fetch.NewLocations( CDNURL+"$HASH-content-textures2.zip#ClassImages.PNG", CDNURL+"$HASH-RobloxStudio.zip#RobloxStudioBeta.exe", ), }, "Production": { Builds: fetch.NewLocations(CDNURL + "DeployHistory.txt"), Latest: fetch.NewLocations(CDNURL + "versionQTStudio"), APIDump: fetch.NewLocations(CDNURL + "$HASH-API-Dump.json"), ReflectionMetadata: fetch.NewLocations(CDNURL + "$HASH-RobloxStudio.zip#ReflectionMetadata.xml"), ExplorerIcons: fetch.NewLocations( CDNURL+"$HASH-content-textures2.zip#ClassImages.PNG", CDNURL+"$HASH-RobloxStudio.zip#RobloxStudioBeta.exe", ), Live: []fetch.Location{ fetch.Location{ Format: ".json", URL: mustParseURL("https://versioncompatibility.api.roblox.com/GetCurrentClientVersionUpload/?apiKey=76e5a40c-3ae1-4028-9f10-7c62520bd94f&binaryType=WindowsStudio"), }, fetch.Location{ Format: ".json", URL: mustParseURL("https://versioncompatibility.api.roblox.com/GetCurrentClientVersionUpload/?apiKey=76e5a40c-3ae1-4028-9f10-7c62520bd94f&binaryType=WindowsStudio64"), }, }, }, }, UseConfigs: []string{ "Archive", "Production", }, }, }
var StyleRobloxDark = styles.Register(chroma.MustNewStyle("roblox-dark", chroma.StyleEntries{ chroma.Background: "bg:#252525", chroma.LineHighlight: "bg:#555555", chroma.LineNumbersTable: "#B4B4B4", chroma.LineNumbers: "#B4B4B4", chroma.Error: "#FF0000", chroma.Keyword: "#F86D7C bold", chroma.Name: "#CCCCCC", chroma.LiteralString: "#ADF195", chroma.LiteralNumber: "#FFC600", chroma.Operator: "#CCCCCC", chroma.OperatorWord: "#F86D7C bold", chroma.Punctuation: "#CCCCCC", chroma.Comment: "#666666", chroma.CommentPreproc: "#66FFCC", }))
StyleRobloxDark is a dark theme for code syntax highlighting.
var StyleRobloxLight = styles.Register(chroma.MustNewStyle("roblox-light", chroma.StyleEntries{ chroma.Background: "bg:#FFFFFF", chroma.LineHighlight: "bg:#E2E6D6", chroma.LineNumbersTable: "#7F7F7F", chroma.LineNumbers: "#7F7F7F", chroma.Error: "#FF0000", chroma.Keyword: "#00007F bold", chroma.Name: "#000000", chroma.LiteralString: "#7F007F", chroma.LiteralNumber: "#007F7F", chroma.Operator: "#7F7F00", chroma.OperatorWord: "#00007F bold", chroma.Punctuation: "#7F7F00", chroma.Comment: "#007F00", chroma.CommentPreproc: "#7F0000", }))
StyleRobloxLight is a light theme for code syntax highlighting.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { // Resources is the directory containing resource files. Resources string // Templates is the directory containing template files. Templates string // Documents is the directory containing document files. Documents string // DocResources is the directory containing document resource files. DocResources string // UseGit sets whether document parsing is aware of git. If so, only // committed content will be used. That is, untracked files are ignored, and // only committed modifications to a file are used. UseGit bool }
type Output ¶
type Output struct { // Root is the directory to which generated files will be written. Root string // Sub is a path that follows the output directory and precedes a // generated file path. Sub string // Resources is the path relative to Sub where generated resource files // will be written. Resources string // DocResources is the path relative to Sub where document resource files // will be written. DocResources string // Manifest is the path relative to Sub that points to the manifest file. Manifest string // Host is the host part of the absolute URL of the site. Host string }
func (*Output) AbsFilePath ¶
AbsFilePath generates an absolute path located in the Output. On a web server serving static files, the returned path is meant to point to the same file as the file pointed to by the URL generated by FileLink.
func (*Output) AbsPathFromLink ¶
AbsPathFromLink transforms a link into an absolute path, if possible.
func (*Output) FilePath ¶
FilePath generates a file path relative to the output root directory. On a web server serving static files, the returned path is meant to point to the same file as the file pointed to by the URL generated by FileLink.
func (*Output) LinkFromPath ¶
LinkFromPath transforms a path into a link, if possible.
func (*Output) ParseDocReference ¶
func (*Output) PathFromLink ¶
PathFromLink transforms a link into a path, if possible.