Skip to content

Commit ff70cfc

Browse files
committed
sync changes
1 parent 4ba557d commit ff70cfc

18 files changed

+337
-152
lines changed

activate-asciidoc-content.adoc

+20-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ author bio at bottom of post (see smashingmagazine or alistapart for example)
3232

3333
// tag::content[]
3434

35+
////
3536
[.topic.source]
3637
== Enable Asciidoctor gem, set version
3738

3839
[source,ruby]
3940
.+Gemfile+
40-
gem 'asciidoctor', '>= 0.1.4.pre'
41+
gem 'asciidoctor', '0.1.4'
4142

4243
[.topic.source]
4344
== Update gems
@@ -77,6 +78,7 @@ Using awestruct (0.5.2)
7778
Using bundler (1.3.5)
7879
Your bundle is updated!
7980
....
81+
////
8082
8183
[.topic.source]
8284
== Configure Asciidoctor
@@ -101,12 +103,14 @@ asciidoctor:
101103
== Create a page in AsciiDoc format
102104
103105
[source,asciidoc]
104-
.+about.adoc+
106+
.+about.adoc+ (NOT +about.adoc.txt+) in project folder
105107
----
106108
= About {sitename} <1>
107109
Your Name
108-
:awestruct-layout: base <2>
110+
:page-layout: base <2>
111+
:showtitle: <3>
109112
113+
[.lead]
110114
{sitename} was founded by {author} during a conference workshop.
111115
It's quickly becoming much bigger than this humble beginning.
112116
@@ -115,11 +119,12 @@ It's transformed by http://awestruct.org[Awestruct] and http://asciidoctor.org[A
115119
----
116120
<1> Becomes main heading on the page
117121
<2> Specifies the layout to use to frame this content
122+
<3> Shows the page title as an h1 heading
118123
119124
ifndef::backend-slides[]
120125
NOTE: AsciiDoc does not require a special "front-matter" header.
121126
Instead, regular AsciiDoc attribute entries can be used.
122-
Attribute names that begin with +awestruct-+ are passed to Awestruct as front-matter variables.
127+
Attribute names that begin with +page-+ are passed to Awestruct as front-matter variables.
123128
endif::backend-slides[]
124129
125130
[.topic.source]
@@ -135,6 +140,17 @@ endif::backend-slides[]
135140
136141
// TODO also add in footer
137142
143+
[.topic.source]
144+
== Make it Sassy!
145+
146+
[source,sass]
147+
.Append to +stylesheets/app.scss+
148+
----
149+
.paragraph.lead > p {
150+
@extend %lead;
151+
}
152+
----
153+
138154
[.topic.source]
139155
== Clean and preview site to see changes
140156

activate-posts-extension.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ layout: base
151151
== Create a new post
152152

153153
[source,asciidoc]
154-
.+posts/docs-workshop-oscon-2013.adoc+
154+
.+posts/docs-workshop-rwx-2013.adoc+
155155
----
156-
= Docs Workshop at OSCON 2013
156+
= Docs Workshop at RWX 2013
157157
Author Name
158-
2013-07-22
159-
:awestruct-tags: [conference, oscon]
158+
2013-12-04
159+
:page-tags: [conference, rwx]
160160
161-
Content of first post, reporting from OSCON!
161+
Content of first post, reporting from RWX!
162162
----
163163

164164
TIP: The default layout for a post is +post+, so you don't have to specify it in the AsciiDoc header.

add-comments-and-analytics.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extension Awestruct::Extensions::Disqus.new
4141

4242
[source,yaml]
4343
----
44-
disqus: writeadapt-{username}
44+
disqus: writeadapt-%USERNAME%
4545
disqus_generate_id: true
4646
disqus_developer: true
4747
----

add-sidebar-and-collaborate-buttons.adoc

+10-3
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,21 @@ Dan Allen
4646
[source,yaml]
4747
.+_config/site.yml+
4848
----
49-
edit_base_url: https://github.com/{username}/writeadapt-{username}/edit/master
50-
raw_base_url: https://github.com/{username}/writeadapt-{username}/raw/master
51-
log_base_url: https://github.com/{username}/writeadapt-{username}/commits/master
49+
edit_base_url: https://github.com/%USERNAME%/writeadapt-%USERNAME%/edit/master
50+
raw_base_url: https://github.com/%USERNAME%/writeadapt-%USERNAME%/raw/master
51+
log_base_url: https://github.com/%USERNAME%/writeadapt-%USERNAME%/commits/master
5252
----
5353

54+
== !
55+
56+
[{title-off}, crole=band]
57+
image::pull-requestable-docs.png[]
58+
59+
////
5460
[.topic.source]
5561
== Clean and preview site to see changes
5662
5763
$ rake clean preview
64+
////
5865

5966
// end::content[]

awestruct-asciidoc-tutorial.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ IMPORTANT: Also remove the normalize.css link from +_layouts/base.html.haml+.
437437
----
438438
%li.name
439439
%h1
440-
%a(href="#{site.ctx_path}/")=Asciidoctor.render(site.name, :doctype => :inline)
440+
%a(href="#{site.ctx_path}/")=Asciidoctor.render site.name, :doctype => :inline
441441
----
442442

443443
.Clean and preview site to see changes
@@ -628,7 +628,7 @@ gem 'coderay'
628628
----
629629
require 'asciidoctor'
630630
631-
puts Asciidoctor.render('Write__Adapt__', :doctype => :inline)
631+
puts Asciidoctor.render 'Write__Adapt__', :doctype => :inline
632632
----
633633
....
634634

chunked-content.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ author bio at bottom of post (see smashingmagazine or alistapart for example)
3838
[source,asciidoc]
3939
----
4040
:excerpt: Excerpt of post.
41-
:awestruct-excerpt: {excerpt}
41+
:page-excerpt: {excerpt}
4242
4343
{excerpt}
4444
----

configure-theme-for-asciidoc-and-website.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ IMPORTANT: Make sure to remove the +%hr+ under the +%h1+.
147147
%li.name
148148
%h1
149149
%a(href="#{site.ctx_path}/")
150-
=Asciidoctor.render(site.name, :doctype => :inline)
150+
=Asciidoctor.render site.name, :doctype => :inline
151151
----
152152

153153
[.topic.source]

configure-website-name-title-author-and-organization.adoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ haml:
6262
[.topic.source]
6363
== Clean and preview site to see changes
6464

65-
$ rake clean
66-
$ rake
65+
$ rake clean preview
6766

6867
IMPORTANT: The clean step is required since a change to the configuration file, +_config/site.yml+, does not force pages to be regenerated automatically.
6968

content.adoc

+17-5
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,23 @@ image::blob_content.png[]
3030

3131
== !
3232

33+
[.statement]
34+
{next-label} +
35+
Markdown to AsciiDoc
36+
37+
include::convert-markdown-to-asciidoc.adoc[tags=content]
38+
39+
== !
40+
3341
[.statement]
3442
*Chunk* and *Clump*
3543

44+
////
3645
== The Spreadsheet of Doom, Death, and Horror
3746
3847
[.relax-y, {title-off}]
3948
image::doom_sheet.png[]
40-
41-
== !
42-
43-
[.statement]
44-
Break your *content* into *types*
49+
////
4550

4651
== !
4752

@@ -62,13 +67,20 @@ Break your *content* into *types*
6267

6368
== !
6469

70+
[.statement]
71+
Break your *content* into *types*
72+
73+
== !
74+
6575
[.statement]
6676
*Clump* similar *content* across your project
6777

78+
////
6879
== !
6980
7081
[{title-off}]
7182
image::attribute.png[]
83+
////
7284

7385
== !
7486

convert-markdown-to-asciidoc.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ permalink: /docs/writing-posts/
5757
[{after}]
5858
----
5959
= Writing posts
60-
:awestruct-layout: base
60+
:page-layout: base
6161
:showtitle:
6262
:prev_section: defining-frontmatter
6363
:next_section: creating-pages

deploy-to-github-pages.adoc

+21-19
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Dan Allen
1313
[.topic.source]
1414
== Commit and push any outstanding changes
1515

16-
$ git commit . -m 'Enhancements'
16+
$ git commit . -m "Enhancements"
1717
$ git push origin master
1818

1919
[.topic.source]
@@ -24,7 +24,7 @@ Dan Allen
2424
$ rm -rf .awestruct* .sass-* .gitignore .gitmodules
2525
$ git rm --cached *
2626
$ echo "GitHub Pages placeholder" > index.html
27-
$ git add index.html
27+
$ git add index.html .nojekyll
2828
$ git commit -m "Seed publish branch for GitHub Pages"
2929

3030
// add .ruby-* exclude from this find command
@@ -34,42 +34,43 @@ Dan Allen
3434
== Push the publish branch
3535

3636
$ git push origin gh-pages
37+
$ git checkout master
3738

3839
NOTE: By pushing the *gh-pages* branch, you also activated GitHub Pages to publish your website.
3940

40-
[.follow-up]
41-
View your website at:
42-
$$http://{username}.github.io/writeadapt-{username}/$$
41+
.View your website
42+
----
43+
http://%USERNAME%.github.io/writeadapt-%USERNAME%
44+
----
4345

4446
[.topic.source]
4547
== Setup the Awestruct GitHub Pages deployer
4648

47-
.Switch to the +master+ branch
48-
$ git checkout master
49-
$ git submodule update
49+
//.Switch to the +master+ branch
50+
// $ git checkout master
5051

51-
[source,yaml,max-height=240]
52+
[source,yaml]
5253
.Append to +_config/site.yml+
5354
----
5455
profiles:
5556
development:
5657
deploy: nil #<1>
5758
production:
58-
base_url: http://{username}.github.io/writeadapt-{username}
59-
ctx_path: /writeadapt-{username}
59+
base_url: http://%USERNAME%.github.io/writeadapt-%USERNAME%
60+
ctx_path: /writeadapt-%USERNAME%
6061
asciidoctor:
6162
:attributes:
62-
base_url: http://{username}.github.io/writeadapt-{username}
63-
ctx_path: /writeadapt-{username}
64-
imagesdir: http://{username}.github.io/writeadapt-{username}/images #<2>
63+
base_url: http://%USERNAME%.github.io/writeadapt-%USERNAME%
64+
ctx_path: /writeadapt-%USERNAME%
65+
imagesdir: http://%USERNAME%.github.io/writeadapt-%USERNAME%/images #<2>
6566
deploy:
6667
host: github_pages
6768
branch: gh-pages
6869
----
69-
<1> add nil deploy config to force development as default profile
70+
<1> nil deploy config forces development as default profile
7071
<2> imagesdir must be absolute to work around Atom feed bug
7172

72-
IMPORTANT: Replace `{username}` with your GitHub username.
73+
IMPORTANT: Replace `%USERNAME%` with *your* GitHub username.
7374

7475
[.topic.source]
7576
== Commit deployer configuration
@@ -92,9 +93,10 @@ Generating site: http://localhost:4242
9293
Deploying to github_pages
9394
////
9495

95-
[.follow-up]
96-
View your website again at: +
97-
$$http://{username}.github.io/writeadapt-{username}$$
96+
.View your website again
97+
----
98+
http://%USERNAME%.github.io/writeadapt-%USERNAME%
99+
----
98100

99101
IMPORTANT: Your Awestruct-based website is now live, and available worldwide!
100102

0 commit comments

Comments
 (0)