Clone the git repo from heroku first git clone [email protected]:androidconceptlessons.git
. To add a concept lesson, follow the steps
Want to do it the hacker way, check this file (app/views/concept_lessons/_how_to.html.md) in the git repo & you would know it :)
-
Create/Convert lesson in markdown format. Its relatively simple & straight forward to create markdown content. Refer this link to get started with markdown.
-
Drop your images inside app/assets/images folder. To show them on the lesson, use the format
![Alt text that will appear if image not found](/assets/<the_image_name.jpg>)
-
All the h1 tags are created as sections. The sections are also created as catalogue on the left sidebar. Choose h1 title with care.
-
Save the lesson file inside app/views/concept_lessons directory with prefix _ & suffix .html.md. Eg. _this_is_lesson_one.html.md .
-
Create the link of the lesson in app/views/concept_lessons/index.html.erb file. index.html.erb is a html file & not markdown. Copy paste the
<li>...</li>
content under Android Concept Lessons & put appropriate link & description inside<p>...</p>
-
Add the new file to git
git add app/views/concept_lessons/_name_of_your_file.html.md
, commit the new filesgit commit app/views/concept_lessons/index.html.erb app/views/commit/concept_lessons/_name_of_your_file.html.md
& push it to herokugit push heroku master
. The lesson is athttp:https://this_domain/android-tutorial/name-of-your-file
. The '-' in url gets converted to '_' to get the file.