INTÉGRATIONS
GitHub
Code personnalisé et extraits de code avec GitHub
4 min
l'intégration avec github vous permet de synchroniser le docid\ s7fqtrih4f1xhnsvmi3ev docid 8wwzzzh5y9p2gkpgasd0q , customjs , footertemplate , headertemplate , directement depuis le dépôt github ces variables peuvent être du texte brut ou un lien vers un fichier du dossier racine vous devez simplement définir le archbee json fichier dans votre dépôt et ajouter votre code personnalisé ou votre css personnalisé, comme dans cet exemple 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", }); si vous poussez le code sur github, archbee lira la configuration depuis le archbee json fichier et mettra automatiquement à jour le paramètres de l'espace > code personnalisé section avec votre nouveau code extraits de code vous pouvez ajouter des extraits de code dans votre dépôt github, vous devez juste les configurer dans le config md fichier le config md fichier doit être placé dans le même dossier que le summary md fichier voici un exemple de fichier config md 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"} exemple en supposant que vous ayez le fichier package json (de l'exemple ci dessus) et aussi le fichier config md config md ## specify syntax, from and to parameters explicitly \ use{file="swagger v2 json" from="90" to="127" syntax="javascript"} vous verrez ce qui suit dans le document archbee après l'importation "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.