Updating WEB - LofNaDI/Tutorials GitHub Wiki

Update your web's profile

Hi everyone,

This tutorial will help you to update your web's profile whenever and wherever you wish to.

Get started: Location and logical.

Firstly, you should find your profile's script so as you'll modify it. The web repository is called LofNaDI.Wowchemy, and you could find it inside the project0/ directory. Once you've already found it, then you should go to project0/LofNaDI.Wowchemy/content/authors/yourusername directory. There, it will be one folder to each current or past member of our Lab.

Secondly, open your profile folder (DO NOT OPEN YOUR FELLOW'S FOLDER). There will be two files: avatar.jpeg (your profile’s photo) and _index.md (your profile’s content). Open _index.md with you favorite text editor and make changes.

Finally, I should let you know about the fact that the _index.md has a specific structure that you should NOT change, even though you know how to do it. In that case, please contact with your web's manager.

Checking changes on local-host: Before update.

Before update the web, please make sure that all the changes have already been done correctly. To do so, first, we'll simulate the modifications on a local-host. Once you open your cmd and go through it to the website repository then, introduce the following commands.

hugo server;

hugo server --disableFastRender;

localWeb;*

How can I create my own permanent alias? See how at the end of this tutorial*.

This command will give you a feedback which have a local-port direction as http://localhost:1313/. Open that link address on your browser. Then, read and check carefully all the modifications. Repeat this process as much as you'll need until get your best.

TIP --> To introduce new changes is NOT necessary stop your local-host, just save the new modification on your _index.md file and open your browser where you've already opened the local-host. Check again and work on it until you get what you want.

Update the remote web repository

git status make sure that the remote repository have already been up to date, otherwise report it to your web manager.

git add * If the remote repository is updated then add all your changes.

git commit -m 'comment' Write a descriptive comment to track your commits as mandatory request. It will help to handle all the modifications.

git push Upload the change to the remote repository

git status Check if the remote repository have already been up to date.

Web compilation

hugo --themesDir themes -D -F;

web_compiler;

git status

Once you have done the compilation of your changes, you should get a GitHub message seeing that you've modified the public folder although you haven't already done anything in that folder that's cause' public's folder is where the compiler make his job. Pay attention on the GitHub message, it have to say something as modified: public/(modified content). So now, what we have to do is update the remote repository with those compiler files.

Public's folder update.

In order to add our compilation files to the remote repository, you should go to public's folder (project0/LofNaDI.Wowchemy/public/). There commit all the new changes.

git add *

git commit -m 'comment'

git push

After you have done that then you go back to the main web's folder (project0/LofNaDI.Wowchemy/)

git status

You should get a very similar message from GitHub but in this case it'll say something as "new commits" rather than "modified contents" as I told you above.

Finally, add all the new committed changes to the remote repository using the usual commands.

git add *

git commit -m 'comment'

git push

Let's check if it was done: https://lofnadi.github.io/

Create your permanent alias

Open your cmd and edit the .bashrc file, you could use any editor that you'd rather.

nano ~/.bashrc

Then,scroll down until you find the "alias definition area". Once you've figured out where is it, then use the following syntax:

alias **short-name**='command line'

Finally, save your alias and exit to the editor screen. In case, you want to use your alias in that moment, first you will need to update the .bashrc file using the following command:

source ~/.bashrc

If you don't do this, it will be updated when you shutdown/switch off/turn off your computer.

Any doubts?

Do I miss something? Let me know. I hope this tutorial would be helpful.

Best,

Silvia Ph.D candidate.

email: [email protected]