Skip to content

Commit e0b6ebc

Browse files
authored
Merge pull request #1564 from progit/check_epub
2 parents 019a33b + 1a7c941 commit e0b6ebc

File tree

14 files changed

+34
-22
lines changed

14 files changed

+34
-22
lines changed

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ gem 'asciidoctor-pdf', '1.5.3'
1212
gem 'coderay', '1.1.3'
1313
gem 'pygments.rb', '1.2.1'
1414
gem 'thread_safe', '0.3.6'
15-
gem 'epubcheck', '3.0.1'
15+
gem 'epubcheck-ruby', '4.2.4.0'
16+
gem 'html-proofer', '3.17.2'

Rakefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
namespace :book do
2+
def exec_or_raise(command)
3+
puts `#{command}`
4+
if (! $?.success?)
5+
raise "'#{command}' failed"
6+
end
7+
end
8+
29
desc 'build basic book formats'
310
task :build do
411

@@ -16,10 +23,14 @@ namespace :book do
1623
`bundle exec asciidoctor #{params} -a data-uri progit.asc`
1724
puts " -- HTML output at progit.html"
1825

26+
exec_or_raise('htmlproofer --check-html progit.html')
27+
1928
puts "Converting to EPub..."
2029
`bundle exec asciidoctor-epub3 #{params} progit.asc`
2130
puts " -- Epub output at progit.epub"
2231

32+
exec_or_raise('epubcheck progit.epub')
33+
2334
# Commented out the .mobi file creation because the kindlegen dependency is not available.
2435
# For more information on this see: #1496.
2536
# This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.

book/03-git-branching/sections/workflows.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ It's generally easier to think about them as work silos, where sets of commits g
2323

2424
[[lrbranch_b]]
2525
.A "`silo`" view of progressive-stability branching
26-
image::images/lr-branches-2.png[A "`silo`" view of progressive-stability branching]
26+
image::images/lr-branches-2.png[A silo view of progressive-stability branching]
2727

2828
You can keep doing this for several levels of stability.
2929
Some larger projects also have a `proposed` or `pu` (proposed updates) branch that has integrated branches that may not be ready to go into the `next` or `master` branch.

book/04-git-server/sections/gitlab.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ After you've logged in, click the "`Admin area`" icon in the menu at the top rig
3030

3131
[[gitlab_menu]]
3232
.The "`Admin area`" item in the GitLab menu
33-
image::images/gitlab-menu.png[The `"Admin area`" item in the GitLab menu]
33+
image::images/gitlab-menu.png[The Admin area item in the GitLab menu]
3434

3535
===== Users
3636

book/06-github/sections/1-setting-up-account.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ If you don't already have one, see <<ch04-git-on-the-server#_generate_ssh_key>>.
3333
Open up your account settings using the link at the top-right of the window:
3434

3535
.The "`Account settings`" link
36-
image::images/account-settings.png[The "`Account settings`" link]
36+
image::images/account-settings.png[The Account settings link]
3737

3838
Then select the "`SSH keys`" section along the left-hand side.
3939

4040
.The "`SSH keys`" link.
41-
image::images/ssh-keys.png[The "`SSH keys`" link]
41+
image::images/ssh-keys.png[The SSH keys link]
4242

4343
From there, click the "`Add an SSH key`" button, give your key a name, paste the contents of your `~/.ssh/id_rsa.pub` (or whatever you named it) public-key file into the text area, and click "`Add key`".
4444

@@ -55,7 +55,7 @@ Next, if you wish, you can replace the avatar that is generated for you with an
5555
First go to the "`Profile`" tab (above the SSH Keys tab) and click "`Upload new picture`".
5656

5757
.The "`Profile`" link
58-
image::images/your-profile.png[The "`Profile`" link]
58+
image::images/your-profile.png[The Profile link]
5959

6060
We'll choose a copy of the Git logo that is on our hard drive and then we get a chance to crop it.
6161

book/06-github/sections/2-contributing.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This opens up a discussion thread with code review, and the owner and the contri
2121
To fork a project, visit the project page and click the "`Fork`" button at the top-right of the page.
2222

2323
.The "`Fork`" button
24-
image::images/forkbutton.png[The "`Fork`" button]
24+
image::images/forkbutton.png[The Fork button]
2525

2626
After a few seconds, you'll be taken to your new project page, with your own writeable copy of the code.
2727

@@ -123,7 +123,7 @@ To https://github.com/tonychacon/blink
123123

124124
Now if we go back to our fork on GitHub, we can see that GitHub noticed that we pushed a new topic branch up and presents us with a big green button to check out our changes and open a Pull Request to the original project.
125125

126-
You can alternatively go to the "`Branches`" page at `https://github.com/<user>/<project>/branches` to locate your branch and open a new Pull Request from there.
126+
You can alternatively go to the "`Branches`" page at `\https://github.com/<user>/<project>/branches` to locate your branch and open a new Pull Request from there.
127127

128128
.Pull Request button
129129
image::images/blink-02-pr.png[Pull Request button]

book/06-github/sections/3-maintaining.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Let's create a new repository to share our project code with.
99
Start by clicking the "`New repository`" button on the right-hand side of the dashboard, or from the `+` button in the top toolbar next to your username as seen in <<_new_repo_dropdown>>.
1010

1111
.The "`Your repositories`" area
12-
image::images/newrepo.png[The "`Your repositories`" area]
12+
image::images/newrepo.png[The Your repositories area]
1313

1414
[[_new_repo_dropdown]]
1515
.The "`New repository`" dropdown
16-
image::images/new-repo.png[The "`new repository`" dropdown]
16+
image::images/new-repo.png[The new repository dropdown]
1717

1818
This takes you to the "`new repository`" form:
1919

2020
.The "`new repository`" form
21-
image::images/newrepoform.png[The "`new repository`" form]
21+
image::images/newrepoform.png[The new repository form]
2222

2323
All you really have to do here is provide a project name; the rest of the fields are completely optional.
2424
For now, just click the "`Create Repository`" button, and boom – you have a new repository on GitHub, named `<user>/<project_name>`.
@@ -27,7 +27,7 @@ Since you have no code there yet, GitHub will show you instructions for how to c
2727
We won't belabor this here; if you need a refresher, check out <<ch02-git-basics-chapter#ch02-git-basics-chapter>>.
2828

2929
Now that your project is hosted on GitHub, you can give the URL to anyone you want to share your project with.
30-
Every project on GitHub is accessible over HTTPS as `https://github.com/<user>/<project_name>`, and over SSH as `[email protected]:<user>/<project_name>`.
30+
Every project on GitHub is accessible over HTTPS as `\https://github.com/<user>/<project_name>`, and over SSH as `\[email protected]:<user>/<project_name>`.
3131
Git can fetch from and push to both of these URLs, but they are access-controlled based on the credentials of the user connecting to them.
3232

3333
[NOTE]

book/06-github/sections/4-managing-organization.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Normally these accounts are used for Open Source groups (such as "`perl`" or "`r
1212
An organization is pretty easy to create; just click on the "`+`" icon at the top-right of any GitHub page, and select "`New organization`" from the menu.
1313

1414
.The "`New organization`" menu item
15-
image::images/neworg.png[The "`New organization`" menu item]
15+
image::images/neworg.png[The New organization menu item]
1616

1717
First you'll need to name your organization and provide an email address for a main point of contact for the group.
1818
Then you can invite other users to be co-owners of the account if you want to.

book/08-customizing-git/sections/attributes.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ These filters can be set to do all sorts of fun things.
198198

199199
[[filters_a]]
200200
.The "`smudge`" filter is run on checkout
201-
image::images/smudge.png[The "`smudge`" filter is run on checkout]
201+
image::images/smudge.png[The smudge filter is run on checkout]
202202

203203
[[filters_b]]
204204
.The "`clean`" filter is run when files are staged
205-
image::images/clean.png[The "`clean`" filter is run when files are staged]
205+
image::images/clean.png[The clean filter is run when files are staged]
206206

207207
The original commit message for this feature gives a simple example of running all your C source code through the `indent` program before committing.
208-
You can set it up by setting the filter attribute in your `.gitattributes` file to filter `*.c` files with the "`indent`" filter:
208+
You can set it up by setting the filter attribute in your `.gitattributes` file to filter `\*.c` files with the "`indent`" filter:
209209

210210
[source,ini]
211211
----

book/09-git-and-other-scms/sections/client-svn.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Subversion has to clone one revision at a time and then push it back into anothe
7878

7979
Now that you have a Subversion repository to which you have write access, you can go through a typical workflow.
8080
You'll start with the `git svn clone` command, which imports an entire Subversion repository into a local Git repository.
81-
Remember that if you're importing from a real hosted Subversion repository, you should replace the `file:///tmp/test-svn` here with the URL of your Subversion repository:
81+
Remember that if you're importing from a real hosted Subversion repository, you should replace the `\file:///tmp/test-svn` here with the URL of your Subversion repository:
8282

8383
[source,console]
8484
----

0 commit comments

Comments
 (0)