GitHub | Education Labs | Mapbox
文章推薦指數: 80 %
GitHub is a static site hosting service that allows you to update and iterate on projects collaboratively either in the browser or locally. Youareusinganoutdatedbrowserandwillencountersomeproblemswithourwebsite.Pleaseconsiderupgrading.UpgradeNowEducationLabsTutorialsandhands-onlessonsforlearning3WaystoHostaWebMapGitHubCreateaGitHubaccountCreateanewGitHubRepositoryAddfilestotherepositoryCreateanewfileUploadfilesEnableGitHubPagesNetlifyGlitch3WaystoHostaWebMapGitHubNetlifyGlitchGitHubGitHubisastaticsitehostingservicethatallowsyoutoupdateanditerateonprojectscollaborativelyeitherinthebrowserorlocally.GitHubPagestakesyourcoderepositories(HTML,CSS,andJavaScript,etcfiles)andpublishesawebsite.Note:ThedefaultrootURLforwebsitespublishedusingGitHubPagesis:username.github.ioCreateaGitHubaccountCreateaGitHubaccount.WhensigningupforaGitHubaccount,youwillneedtochooseausername.Whenselectingausername,rememberthatyourusernamewillbeintheURLofyourwebsite.CreateanewGitHubRepositoryOnceyouhavecreatedyourGitHubaccount,createanewrepository.Arepositoryor“repo”isadirectorywhereyourprojectscanlive.Arepositorystoresyourprojectcodefiles,textfiles,imagefiles,younameit,insidearepository.Select‘Createanewrepository’.Nameitforyourmapproject(thiswillbevisibleintheURL).Maketherepository‘Public’.Underthefree-tier,repositoriesmustbepublictoenableGitHubPages.Clicktheboxto‘InitializethisrepositorywithaREADME'.YourREADMEfileiswhereyoucanaddinformationaboutyourproject.CheckingthisboxwillmakeiteasierforyoutogetarepositorystartedifyouarenewtoGitHub.Select‘CreateRepository’.AddfilestotherepositoryNowit’stimetoaddyourfilestotherepository.Inthistutorial,wewillshowhowtoaddfilesmanuallyaswellashowtouploadfilesfromyourcomputer.CreateanewfileSelectthe‘Addfile’dropdownmenu.Next,select‘Createnewfile’andnamethenewfile‘index.html’.Pasteinyourhtmlcodetotheblankindex.htmlfile.Onceyou’vefinishedinputtingyourcode,scrolldowntothebottomofthepageandselect‘CommitNewFile’.UploadfilesYoucanalsouploadfilesdirectlyfromyourcomputer.GitHuballowsuserstouploadmultiplefilesatonce.ThisisusefulforprojectsthathavemultipleHTML,CSS,JS,andimagefiles.Underthe‘Addfiles’dropdownmenu,select‘Uploadfiles’.Eitherdraganddropyourfilesintotheuploadsinterfaceorselect‘chooseyourfiles’.Onceyou’veselectedallthefiles,scrolldowntothebottomofthepageandselect‘CommitChanges’.EnableGitHubPagesToenableGitHubPages,gototherepository’sSettings,whichyouaccessusingthegearsymbolintheupperrighthandcorner.Scrolldowntothesectionlabeled‘GitHubPages’andchangethesourcebranchselectionfrom‘none’to‘master’andselectsave.Afteraminuteortwo,yourGitHubPageURLwillbepublishedonline.ItwilllooksomethinglikeHTTPS://[YOURGITHUBNAME].github.io/[YOURREPOSITORYNAME]/-youcanfindyourURLbynavigatingbacktotheGitHubPagessectioninyourrepositorysettings.Congratulations!Younowhaveawebsite!Wasthispagehelpful?Submitfeedback
延伸文章資訊
- 1GitHub | Education Labs | Mapbox
GitHub is a static site hosting service that allows you to update and iterate on projects collabo...
- 2MapLibre GL - GitHub
The open-source fork of Mapbox GL JS: Interactive maps in the browser, powered by vector tiles an...
- 3Mapbox - GitHub
Mapbox. Mapbox is the location data platform for mobile and web applications. We're changing the ...
- 4GitHub Adds Maps | by Mapbox
Github is taking advantage of MapBox Streets' new open source vector tiles, perfectly tailored to...
- 5maputnik/editor - GitHub
A free and open visual editor for the Mapbox GL styles targeted at developers and map designers. ...