2. Project management¶
2.0 My student agreement¶
I had signed my student agreement here
2.1 Build a personal site describing you and your final project¶
-
By following git simple cheatsheet i installed my Git, generated my SSH key and configured it into my Gitlab
-
Copy my SSH address from the web browser and ran git clone command in command line
git clone git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/chaihuo/students/nanjie-chen.git
- Then i downloaded Mkdocs & Atom.
[Updated 26,June,2020]: Atom is the text editing tool that can be used to do documentation(Markdown for me), also support html code, python, etc. The most important reason for me to go with Atom was that not only it is an easy to use documentation editor but also fastened the way i do git processes and do not need to use terminal every time.
Also during the fabacademy studying i used other editing and coding tools like Visual Studio - i prefer to code use VS and to do documentation with Atom.
[Updated 26,June,2020]: Mkdocs is a tool to generate HTML webpage from another easier language ‘Markdown’. I didn’t have much of an experience developing a website using HTML,CSS,Javescript - So i chose Mkdocs to help me build a website using the language ‘Markdown’.
Another function of Mkdocs is that - by running the following code in command line
mkdocs serve
I will be able to modify my Markdown codes in Atom and watching the changes caused by my modification to the codes, from a browser in real time.
- By several days learning and working on markdown, i created my initial webpage.It does not look fancy and the template mostly from previous years without much of modification currently, but i’m looking at improving it day by day.
3. Problem Occurred & Solutions¶
- In order to download Mkdocs i used python pip method
pip install Mkdocs
- However it didn’t work out. 2 problems
My python version too low
Permissions not enough
- In order to solve above 2 problems i ran another command pip3(newer version of python) and sudo(access to admin authority). Code ran as below
sudo pip3 install mkdocs
And it worked.
- Getting address of an image that will be imported to a webpage
When i was modifying my docs from Atom and wanted to insert my avatar photo, i do not know the rules of how path works - arrowed in the below screenshot
I asked one of my friends who works as a web developer. She told me ../ means going back to the parent folder whereas ./ means current folder. You will need to locate the path where the image is stored in your computer. - how do i combine these 2 into 1?
I currently do not have an answer on this one yet but i’m hoping to have it answered throughout my continuous studying at Fab Academy. - Images path i will have to write them one by one?
I found it every time i will have to locate my image path one by one - by looking at their folders and type things like “../images/week01/compressed/question1.jpg”. Wondering if there’s any quicker way doing it, if i have a lot of images to be inserted.
I currently do not have an answer on this one yet but i’m hoping to have it answered throughout my continuous studying at Fab Academy.
2.1.2 Useful links¶
2.2 Upload it to the class archive & Work through a git tutorial¶
- After the webpage modified locally and monitored by “mkdocs serve” in real time, i compressed my images using Gimp, ran through a git tutorial(with SSH key set up) and then ran following codes to push it to my class archive
git add .
git commit -m 'whatever i want to put in'
git push origin mater
2.2.1 Problem Occurred & Solutions¶
-
how do i go to previous version if i did something wrong? (version control)?
I ran through a git tutorial and git as i understood is a tool for version control. Then my question is that how do i go to previous version if i did something wrong and want to go back to previous version? git rebase it is. I found a yoututbe video that provides very detailed instruction on it. -
Can I just pull a single file instead of pulling the whole repository? This isn’t actually a real problem that i Occurred so far, however i’m imaging that if i am working with others on the same project together, if someone modified a file and i want to pull it locally in my local repository, if i run “git pull” will it be the case that not only i get the file i wanted, but also all the files in the remote repository would override my local repository.
No i cannot do that after weeks i’d been working with git.(UPDATED 20200408)