Hosting op Github - NieneB/pzh_web_map GitHub Wiki
:arrow_forward: Head over to GitHub.com and create a new repository named myfirstwebmap
:arrow_forward: Give your repository a nice description. Like:
My First Web Map in Leaflet.js
:arrow_forward: Setting: Public
:arrow_forward: Initialize this repository with a README.md
:arrow_forward: Create Repository
Now we have our own repository!
Uploading files
:arrow_forward:. Upload all the files you need for your web map. Choose either the Leaflet or the D3 map. We can only show 1 per repository. Repeat these steps if you want to show both!
- index.html
- main.css
- main.js
Hosting with GitHub-Pages
GitHub has this awesome trick! If we change our main branch to a GitHub Pages branch and put a index.html
file in there, GitHub will host our website!
:arrow_forward: Click on the Settings tab and scroll down to the GitHub Pages section.
:arrow_forward: Then select the master branch source and click on the Save button.
Fire up a browser and go to http://username.github.io/repository. Change the user-name in the link to your own GitHub user name and the repository to your repository name!
Read more about it here: https://pages.github.com/
Editing the README.md
The README contains the text that is shown at the bottom of your repository. This usually contains a small explanation of what the repository is about and links to useful other sources. Let's edit our README.md in the browser to customize it!
:arrow_forward: Click on the README.md file and edit it by clicking the edit button.
:arrow_forward: In the README.md put the following:
~~~
# My First Web Map in Leaflet.js
This repository contains the scripts and data for my first interactive web map.
You can view my map <[HERE](http://username.github.io/repository)>
~~~
:arrow_forward: Change the user-name in the link to your own GitHub user name and the repository to your repository name!
:arrow_forward: Commit changes.
Now send the link to all your family and friends!
An example of how your repository should look can be found here: https://github.com/NieneB/myfirstwebmap