Describe how you put your homework into a web page and make it available to the public.
1. Access the webspace for the first time.
I recommending the university-provided webspace to host your website. There are a number of ways to access this space:More information can be found here .
These methods get you to the home folder, ~. The home folder is space where you can put files in and access them directly from the computer lab in Teer, should you desire. The file permissions here are set so that only you can see/edit these files. The public_html directory is already setup for you to host public documents, and the file permissions of things in here are automatically set so that only you can edit them, but everyone can see them (like a webpage generally is).
To get to the public_html directory, either type "cd public_html" at the command line/terminal (Linux/Mac), or double-click the "public_html" folder (Mac/Windows).
2. Make a homepage in the public_html directory.
Using your favorite text editor (graphical: gedit, kate, TextEdit, notepad, etc.; text-only: vi, emacs, etc.), create a document named index.html. This page will be the default when anyone accesses your website by typing http://people.duke.edu/~netid. You can find basic HTML tutorials anywhere on the internet, but the gist of it is that the document needs to contain at the very minumum the following tags: <html> <body> </body> </html>. The content of the webpage goes inside the body tags. HTML is a tag-oriented languages with openers and closers which fit around things to format them. Bold is done with <b></b> tags, italics with <i></i> tags, underline with <u></u> tags, new paragraph with <p></p> tags and so on.
You can check to see if your page worked by accessing it at http://people.duke.edu/~netid.
Websites can be fantastically simple or fantastically complex. The barebones two tag-pair structure listed above will do the job, but if you want it to be prettier or more interactive more HTML code can be inserted into the document to make it happen. The easiest way to go about this is to find a webpage you like, right-click it and click "View Source" (a common option on most browsers). This is the HTML code for that webpage. Simple copy and paste in to your own website (and delete stuff you don't need). If you copy something super complex, you might have to acknowledge the intellectual property, be forewarned.
3. Make a new document.
Since you'll likely have several homeworks and won't want them all directly on your homepage, you will need to make additional pages. Make a new document with any name ending in .html (such as homework1.html). Add the necessary html and body tags, and then type in the homework inside the body tag-pair.
4. Link them.
Now you have multiple websites. You can directly access any of them from the web by typing their URLs (e.g. http://people.duke.edu/~netid/index.html, http://people.duke.edu/~netid/homework1.html). BUT, well-designed webpages typically have links from one-page to another. For example, you might want to link your homework 1 page to the home page so that anyone accessing the homepage will see that your homework 1 page exists and can access it. Without linking, they can still access it, but they have to know where it's located and type it in manually.
Linking can be done by a simple command: <a href = "url">Text</a>
. Simple replace "url" with the name of the link you want to link to. This can be absolute (especially for linking outside webpages) or relative (especially for your own webpages). For example, in order to link your homepage (index.html) to your homework1.html, both located in the public_html folder, add the following line to your index.html: <a href = "homework1.html">Homework 1</a>. The absolute path version would be <a href = "http://people.duke.edu/~netid/homework1.html"> Homework 1</a>. Both yield the same result.You can also link outside webpages in the same way (don't forget to include the whole URL!): <a href = "http://www.google.com">Google</a>
5. Check permissions.
Everything should be fine; you should be able to access all of the webpages from the Internet. If not, try the instructions here to make sure the permissions on the files allow reading by the public: http://www.wpi.edu/Academics/CCC/Help/Unix/Webdev/webchmod.html .
6. Upload additional files.
You will inevitably want to add your own files to the website. This could be uploading source code, image results, pdf files, anything. This can be done using the scp command for text-based approaches (Linux, Mac) or by dragging and dropping to the directory (Mac, Windows).
scp-ing will require the you to type the following command at the command line/ terminal: scp sendThisFile.pdf netid@teer12.oit.duke.edu:~/public_html/. In order to do that, you need to have the terminal in the directory where the file is located or use absolute locations on your computer, like this: scp /Users/me/Desktop/sendThisFile.pdf netid@teer12.oit.duke.edu:~/public_html/ .
7. Link the files.
Just as in step 4, you will want to link these files to the webpage. Simply use the filename as an alternative to the URL and it works exactly the same way. The following command links an image (reallyCoolPic.png) to your webpage when you place the line into that webpage (e.g. homework1.html file): <a href = "reallyCoolPic.png"> Really Cool Picture</a>
8. LaTeX.
Being a class in the math department, it is not unreasonable to have to work out math by hand. Thus, there are two ways to do this and turn it in on a website:
1. Work it out on paper, scan it, upload (scp) it, and link it.
2. Type LaTeX code in the HTML.
LaTeX is a wonderful scripting language for efficiently writing mathematical expressions on computers. You can add LaTeX to your webpage by adding an interpreter script in the HTML file (the first thing within the body tag-pair). There are several choices for this, but one is:
<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: { extensions: ["autobold.js"] }});
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
</script>
<script type="text/javascript">
LatexIT.add('p',true);
</script>
After putting this in, LaTeX math mode is enabled by surrounding formulas by pairs of single or double dollar signs ($ 1+1=2 $, or $$ 1+2 = 3 $$). The pair of singles makes an inline math-mode session, for typing formulas within a paragraph of text. The pair of doubles makes a new-line math-mode session, for typing formulas separately from a paragraph of text.
9. Make it better.
You can try to put images into the webpage, rather than just linking them, to make it look better. There are myriad other ways to make your webpage more aesthetic or more useable. The minimum though, described above, will provide exactly what you need to post and turn in homework.