Twig code showing in browser I'm learning how to use Craft. I've set it up locally using MAMP (regular) on OS X Yosemite (10.10.5). Everything is working fine until I start getting into Twig templates. When I try viewing files that contain twig code in any browser, the browser shows the twig code as content (for example, I see{% block main %} and {# comments #} within the window). I'm thinking this is a MAMP issue. 

However, as I understand it, Craft itself uses Twig. If that's the case, then it wouldn't be a MAMP issue, since then both the Craft admin site and my files wouldn't work. Any hints as to where the problem lies would be greatly appreciated. Thanks!

Update: Trying to access it through MAMP Pro to see if that makes a difference. Now I'm being blocked right after the root. Here's a pic of the error (result with localhost in the URL not the file path):


I don't know anything about Apache -- is it safe to display my entire httpd.conf code online to see if anyone knows it's a setting in that files that's causing the issue? I'm sorry -- this question/thread is all over the place.
Are you opening those templates directly in the browser? When you do this, you are bypassing Craft and the browser does not know what to do with the Craft tags or how to access the database and will show the tags instead of the contents.

Since you have got the CP working, all should be good though. If you go to the CP and click on your bold site name at the top left in the nav,  the default homepage (or yours) should get loaded. What you actually see there is the index.html loaded into the _layout.html and you should not get any twig template tags. If you go ahead now and add some made-up segment to the address in the address field of the browser /xyz e.g., you will see the 404.html loaded into _layout.html.

To see your templates like your visitors will see them, Craft needs to kick in. This will only happen, if you enter a pages complete url in the browser, not a template location on your disk. (If you opended the templates directly, your address will look somethin like file:///Applications/MAMP/htdocs… which will not work. Visible or not, your address should always begin with http:// …) 

Have you still got the default news section in the install? You could add 2 or 3 dummy news in the CP, and then navigate to those news entries as described above. The template that gets used to display a single news is news/_entry.html but _entry.html will never be part of the url. It is used by Craft to fill in the contents and your urls will be somtheing like news/dummy-news1, news/dummy-news2. Hope that makes it a bit clearer?