Skip to content

Commit

Permalink
Dev Docs: Add "Edit|History|Report Issue|Discuss" Links To Subheads
Browse files Browse the repository at this point in the history
  • Loading branch information
harding committed Dec 13, 2014
1 parent 25acab7 commit f368d38
Show file tree
Hide file tree
Showing 27 changed files with 331 additions and 20 deletions.
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ all: pre-build-tests build post-build-tests


## Pre-build tests which, aggregated together, take less than 5 seconds to run on a typical PC
pre-build-tests-fast: check-for-non-ascii-urls
pre-build-tests-fast: check-for-non-ascii-urls check-for-wrong-filename-assignments

## Post-build tests which, aggregated together, take less than 5 seconds to run on a typical PC
post-build-tests-fast: check-for-build-errors ensure-each-svg-has-a-png check-for-liquid-errors \
check-for-missing-anchors check-for-broken-markdown-reference-links \
check-for-broken-kramdown-tables check-for-duplicate-header-ids \
check-for-headers-containing-auto-link
check-for-headers-containing-auto-link check-for-missing-subhead-links

## All pre-build tests, including those which might take multiple minutes
pre-build-tests: pre-build-tests-fast
Expand Down Expand Up @@ -134,3 +134,19 @@ check-for-headers-containing-auto-link:
## none of the generated subheadings contain the string
## 'class="auto-link"' produced by autocrossref
$S grep '<\(h[2-6]\).*\?>[^>]\+class="auto-link".*</\1>' _site/en/developer-* | eval $(ERROR_ON_OUTPUT)

check-for-missing-subhead-links:
## Make sure each subhead (h2-h6) either has the subhead links
## (edit,issue,etc) or something like <!-- no subhead-links here -->
$S egrep -n -A1 '<h[2-6]' _site/en/developer-* \
| egrep -v 'developer-documentation|<h[2-6]|^--|subhead-links' \
| eval $(ERROR_ON_OUTPUT)

check-for-wrong-filename-assignments:
## Make sure whenever we use {% assign filename="some-file" %} that the
## filename assignment matches the actual filename. This will, in
## particular, help catch mistakes when we move files
$S find . -name '*.md' \
| xargs grep 'assign *filename' \
| grep -v '^\./\(.*\):{.*filename=.\1"' \
| eval $(ERROR_ON_OUTPUT)
1 change: 1 addition & 0 deletions _includes/example_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/example_intro.md" %}

{% autocrossref %}

Expand Down
6 changes: 6 additions & 0 deletions _includes/example_p2p_networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/example_p2p_networking.md" %}

## P2P Network
{% include helpers/subhead-links.md %}

### Creating A Bloom Filter
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -160,6 +163,7 @@ b50f ....... Filter: 1010 1101 1111 0000
{% endautocrossref %}
### Evaluating A Bloom Filter
{% include helpers/subhead-links.md %}
{% autocrossref %}
Expand Down Expand Up @@ -234,6 +238,7 @@ MATCH FAILURE: Index 0x6 not set in 1010110111110000
{% endautocrossref %}
### Retrieving A MerkleBlock
{% include helpers/subhead-links.md %}
{% autocrossref %}
Expand Down Expand Up @@ -349,6 +354,7 @@ Part of the response is shown in the section below.
{% endautocrossref %}
### Parsing A MerkleBlock
{% include helpers/subhead-links.md %}
{% autocrossref %}
Expand Down
9 changes: 9 additions & 0 deletions _includes/example_payment_processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/example_payment_processing.md" %}

## Payment Processing
{% include helpers/subhead-links.md %}

### Payment Protocol
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -36,6 +39,7 @@ custom example URIs and payment requests for use with testnet.
{% endautocrossref %}

#### PaymentRequest & PaymentDetails
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -62,6 +66,7 @@ programming languages. You will also need a copy of the PaymentRequest
{% endautocrossref %}

##### Initialization Code
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -93,6 +98,7 @@ functions created by `protoc`.
{% endautocrossref %}

##### Configuration Code
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -243,6 +249,7 @@ later.
{% endautocrossref %}

##### Code Variables
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -346,6 +353,7 @@ payment as part of a cryptographically-proven receipt.
{% endautocrossref %}

##### Derivable Data
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -432,6 +440,7 @@ same hashing formula we specified in `pki_type` (sha256 in this case)
{% endautocrossref %}

##### Output Code
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
4 changes: 4 additions & 0 deletions _includes/example_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/example_testing.md" %}

## Testing Applications
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -13,6 +15,7 @@ test their applications with reduced risks and limitations.
{% endautocrossref %}

### Testnet
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -32,6 +35,7 @@ community, so please don't abuse it.
{% endautocrossref %}

### Regtest Mode
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
8 changes: 8 additions & 0 deletions _includes/example_transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/example_transactions.md" %}

## Transactions
{% include helpers/subhead-links.md %}

### Transaction Tutorial
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -30,6 +33,7 @@ wallet.


#### Simple Spending
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -127,6 +131,7 @@ second) and clear the shell variable.


#### Simple Raw Transaction
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -342,6 +347,7 @@ variables.


#### Complex Raw Transaction
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -578,6 +584,7 @@ the block chain or memory pool.


#### Offline Signing
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -874,6 +881,7 @@ Remove old shell variables.


#### P2SH Multisig
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
8 changes: 8 additions & 0 deletions _includes/guide_block_chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/guide_block_chain.md" %}

## Block Chain
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -22,6 +24,7 @@ the consensus rules used by Bitcoin Core.
{% endautocrossref %}

### Block Chain Overview
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -73,6 +76,7 @@ satoshi transaction fee.
{% endautocrossref %}

### Proof Of Work
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -147,6 +151,7 @@ the merkle tree.
{% endautocrossref %}

### Block Height And Forking
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -191,6 +196,7 @@ are usually referenced by the hash of their header (often with the byte order re
{% endautocrossref %}

### Transaction Data
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -260,6 +266,7 @@ otherwise, a valid block with the duplicates eliminated could have the same merk
{% endautocrossref %}

### Consensus Rule Changes
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -318,6 +325,7 @@ implemented](https://gist.github.com/gavinandresen/2355445).
{% endautocrossref %}

#### Detecting Forks
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
5 changes: 5 additions & 0 deletions _includes/guide_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/guide_contracts.md" %}

## Contracts
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -25,6 +27,7 @@ page](https://en.bitcoin.it/wiki/Contracts) of the Bitcoin Wiki.
{% endautocrossref %}

### Escrow And Arbitration
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -125,6 +128,7 @@ service interface using HTML/JavaScript on a GNU AGPL-licensed website.
{% endautocrossref %}

### Micropayment Channel
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -202,6 +206,7 @@ all under an Apache license.
{% endautocrossref %}

### CoinJoin
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
8 changes: 8 additions & 0 deletions _includes/guide_mining.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/guide_mining.md" %}

## Mining
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -24,6 +26,7 @@ hard to modify. Mining today takes on two forms:
{% endautocrossref %}

### Solo Mining
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -55,6 +58,7 @@ block chain.
{% endautocrossref %}

### Pool Mining
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -97,6 +101,7 @@ different reward distribution systems based on this basic share system.
{% endautocrossref %}

### Block Prototypes
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -109,6 +114,7 @@ are used to keep ASIC hashers working at maximum capacity,
{% endautocrossref %}

#### getwork RPC
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand All @@ -122,6 +128,7 @@ discourage or disallow its use.
{% endautocrossref %}

#### getblocktemplate RPC
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down Expand Up @@ -159,6 +166,7 @@ wants to send more transactions to the mining software.
{% endautocrossref %}

#### Stratum
{% include helpers/subhead-links.md %}

{% autocrossref %}

Expand Down
Loading

0 comments on commit f368d38

Please sign in to comment.