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

Already on GitHub? Sign in to your account

Group _includes files in subfolders #1050

Merged
merged 1 commit into from Sep 7, 2015

Conversation

Projects
None yet
2 participants
Contributor

saivann commented Sep 5, 2015

Note; this pull request should be given low priority against any other changes to the devdocs, as it'll conflict with any of them, and is fairly easier to recreate.

We've initially used the _includes path for devdoc content only, but soon added content in subfolders, including the RPC documentation. This pull request aims to reorganize this content a bit to make it more approachable for contributors.

Live preview:
http://bitcointest2.us.to/en/developer-documentation

HTML diff:
http://bitcointest2.us.to/diff.html

(Generated with deterministic plugins only, commits.txt diff was discarded)
ENABLED_PLUGINS="autocrossref glossary redirects alerts releases sitemap" ENABLED_LANGS="fr"

Commands to generate this PR from scratch:

mkdir _includes/templates

mv _includes/index.html _includes/templates/index.html

mv _includes/ref _includes/devdoc

mv _includes/guide_* _includes/devdoc/

mv _includes/ref_* _includes/devdoc/

mv _includes/example_* _includes/devdoc/

mv _includes/fragment_* _includes/devdoc/

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include index.html %}#{% include templates/index.html %}#g'

find . -type f \( -name '*.html' -o -name '*.md' -o -name '*.yaml' -o -name 'Makefile' \) -print | xargs sed -i 's#_includes/ref/#_includes/devdoc/#g'

find . -type f \( -name '*.html' -o -name '*.md' -o -name '*.yaml' -o -name 'Makefile' \) -print | xargs sed -i 's#_includes/guide_#_includes/devdoc/guide_#g'

find . -type f \( -name '*.html' -o -name '*.md' -o -name '*.yaml' -o -name 'Makefile' \) -print | xargs sed -i 's#_includes/ref_#_includes/devdoc/ref_#g'

find . -type f \( -name '*.html' -o -name '*.md' -o -name '*.yaml' -o -name 'Makefile' \) -print | xargs sed -i 's#_includes/example_#_includes/devdoc/example_#g'

find . -type f \( -name '*.html' -o -name '*.md' -o -name '*.yaml' -o -name 'Makefile' \) -print | xargs sed -i 's#_includes/fragment_#_includes/devdoc/fragment_#g'

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include ref/#{% include devdoc/#g'

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include guide_#{% include devdoc/guide_#g'

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include ref_#{% include devdoc/ref_#g'

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include example_#{% include devdoc/example_#g'

find . -type f \( -name '*.html' -o -name '*.md' \) -print | xargs sed -i 's#{% include fragment_#{% include devdoc/fragment_#g'

@saivann saivann changed the title from Group devdoc _includes files together to Group _includes files in subfolders Sep 5, 2015

Contributor

harding commented Sep 5, 2015

Read the commit diff and skimmed the HTML diff and this LGTM. I was thinking about doing something like this myself, so thanks!

My only request would be to have _includes/devdoc/references.md moved back to _includes/references.md. When the Bitcoin Core subsite is added, this file will no longer be exclusively used by the dev docs. I think it's a general file that can be used by any markdown document that uses reference-style links.

Contributor

saivann commented Sep 6, 2015

@harding Thanks! I have rebased the commit with your suggestion and updated the live preview and HTML diff. I have also added the commands used to generate this PR in the description so it can be quickly rebased after any merge conflict. If that's OK with you, I'd let you choose when is the best moment to merge these changes.

Contributor

saivann commented Sep 6, 2015

@harding Now that I think of it, wouldn't it be appropriate for references.md to go in the "helpers" directory alongside "vars.md" and "summaries.md"?

Contributor

harding commented Sep 6, 2015

@saivann putting it in helpers/ would make sense, please feel free to do that. I slightly prefer to have it in the top level directory I guess mainly because I edit it a lot and am too lazy to suffer through an extra type-two-characters-and-hit-tab for the helpers/ directory. :-)

I think merging tomorrow would be good. I think the only pending PR affected by this is #1044 and I have to rebase that to fix a merge conflict anyway. I would like to get this in before either @carnesen or I do any more work on the RPCs.

Contributor

saivann commented Sep 6, 2015

@harding OK, let's keep references.md where it is now and I'll let you merge this tomorrow, thanks!

@harding harding merged commit af17040 into bitcoin-dot-org:master Sep 7, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

harding added a commit that referenced this pull request Sep 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment