Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update formatting of code examples (internal) #246

Closed
16 tasks done
geerlingguy opened this issue Apr 22, 2020 · 2 comments
Closed
16 tasks done

Update formatting of code examples (internal) #246

geerlingguy opened this issue Apr 22, 2020 · 2 comments

Comments

@geerlingguy
Copy link
Owner

@geerlingguy geerlingguy commented Apr 22, 2020

I just did this for Ansible for Kubernetes, but I want to do it for Ansible for DevOps just to make sure I'm consistent across both books.

I have code examples formatted like so right now:

{lang="text",linenos=off}
    handlers:
      - name: restart apache
        service: name=apache2 state=restarted
    
    tasks:
      - name: Enable Apache rewrite module.
        apache2_module: name=rewrite state=present
        notify: restart apache

But I can use the more simplified method in LeanPub's Markua syntax, allowing easier translation between book text and examples/playbooks:

{lang="text",linenos=off}
```
handlers:
  - name: restart apache
    service: name=apache2 state=restarted

tasks:
  - name: Enable Apache rewrite module.
    apache2_module: name=rewrite state=present
    notify: restart apache
```

Checklist:

  • Chapter 1
  • Chapter 2
  • Chapter 3
  • Chapter 4
  • Chapter 5
  • Chapter 6
  • Chapter 7
  • Chapter 8
  • Chapter 9
  • Chapter 10
  • Chapter 11
  • Chapter 12
  • Chapter 13
  • Chapter 14
  • Appendix A
  • Appendix B
@geerlingguy
Copy link
Owner Author

@geerlingguy geerlingguy commented Apr 22, 2020

(This is just an internal change—ideally it will not result in any reader-facing changes to the text!

@geerlingguy
Copy link
Owner Author

@geerlingguy geerlingguy commented Apr 26, 2020

I also made sure to update certain config files and such to use proper language highlighting (e.g. use docker highlighting for Dockerfiles). This should make the book's code samples slightly more readable, at least on color screens (probably won't make a difference on the printed copy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant