GitHub | Education Labs | Mapbox

文章推薦指數: 80 %
投票人數:10人

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



請為這篇文章評分?