INTEGRATIONS
GitHub
Custom code & code snippets with GitHub
4min
integration with github allows you to sync the custom code docid\ cyshqt4kjc pcmnle3ron custom css docid\ d4gup0qqxinigdthftqcn , customjs , footertemplate , headertemplate , directly from the github repository these variables can be raw text or link to a file from the root folder you just need to define the archbee json file in your repo and add your custom code or custom css, like in this example archbee json { "root" "docfolderwithsummary", "structure" { "summary" "summary md", "assets" " archbee/assets" }, "customjs" "custom js", "customcss" " \n { font family \\"comic sans ms\\", cursive, sans serif; }", "footertemplate" "", "headerincludes" "" } summary md # table of contents \ \[introduction]\(introduction md) \## walkthroughs \ \[installing]\(walkthroughs/01 installing app md) \ \[adding event handlers]\(walkthroughs/02 adding event handlers md) \ \[defining custom elements]\(walkthroughs/03 defining custom elements md) \## docs \ \[configuring]\(docs/01 configuring app md) \ \[adding info]\(docs/02 adding info md) \ \[starting app ]\(docs/03 starting app md) custom js window archbee = window archbee || { queue \[], push function (x) {window archbee queue push(x)} }; window archbee push({ eventtype "init", spaceid "published 0auu0nj zflc52lh2yy5u", }); if you push the code to github, archbee will read the configuration from the archbee json file and automatically update the space settings > custom code section with your new code code snippets you can add code snippets in your github repo, you just need to configure them in the config md file the config md file must be placed in the same folder as the summary md file below is an example of a config md file config md ## use a file relative to docspath folder \ use{file="swagger v2 json#l2"} \## relative path to repo structure \ use{file="/app/package json#l1 l5"} \## relative path to docspath folder \ use{file=" /app/package json#l1 l5"} \## one single line \ use{file=" /app/package json#l5"} \## specify syntax, from and to parameters explicitly \ use{file="swagger v2 json" from="l6" to="l10" syntax="javascript"} example assuming that you have the below package json file (from the above example) and also the config md file config md ## specify syntax, from and to parameters explicitly \ use{file="swagger v2 json" from="90" to="127" syntax="javascript"} you will see the following in the archbee doc after the import "post" { "tags" \["pet"], "summary" "add a new pet to the store", "description" "", "operationid" "addpet", "consumes" \["application/json", "application/xml"], "produces" \["application/json", "application/xml"], "parameters" \[ { "in" "body", "name" "body", "description" "pet object that needs to be added to the store", "required" true, "schema" { "$ref" "#/definitions/pet" } } ], "responses" { "200" { "description" "success!" }, "405" { "description" "invalid input" } }, "security" \[ { "api key" \[] }, { "petstore auth" \["write\ pets", "read\ pets"] } ] },
🤔
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.