-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the new .org example and a formatting script
Add ./doc-fmt/ folder that contains the .org example and the script(run.bash) that should be run from the repo root. Its purpose: - remove #+HTML_HEAD_EXTRA: ... readtheorg.css" /> - replace :TOC_4_org:noexport: with :TOC_4_gh:noexport: - apply the gh style TOC
- Loading branch information
Showing
4 changed files
with
472 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
if ! [ -d "./.git" ] | ||
then | ||
echo "Should be executed from the repo root." | ||
exit 1 | ||
fi | ||
|
||
#rm #+HTML_HEAD_EXTRA: ... readtheorg.css" /> in the doc. | ||
find ./doc -name "*.org" -type f -exec sed -i '/#+HTML_HEAD_EXTRA.*readtheorg.css.*/d' {} \; | ||
|
||
#rm #+HTML_HEAD_EXTRA: ... readtheorg.css" /> in the layers. | ||
find ./layers -name "*.org" -type f -exec sed -i '/#+HTML_HEAD_EXTRA.*readtheorg.css.*/d' {} \; | ||
|
||
|
||
|
||
#replace :TOC_4_org:noexport: with :TOC_4_gh:noexport: in the doc. | ||
find ./doc -name "*.org" -type f -exec sed -i 's/\:TOC_4_org\:noexport\:/\:TOC_4_gh\:noexport\:/' {} \; | ||
|
||
#replace :TOC_4_org:noexport: with :TOC_4_gh:noexport: in the layers. | ||
find ./layers -name "*.org" -type f -exec sed -i 's/\:TOC_4_org\:noexport\:/\:TOC_4_gh\:noexport\:/' {} \; | ||
|
||
|
||
|
||
#fix doc TOC. | ||
find ./doc -name "*.org" -type f -exec emacs -batch -l ./doc-fmt/toc-org-gh.el '{}' -f toc-apply \; | ||
|
||
#fix layers TOC. | ||
find ./layers -name "*.org" -type f -exec emacs -batch -l ./doc-fmt/toc-org-gh.el '{}' -f toc-apply \; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#+TITLE: FOO | ||
|
||
* Table of Contents :TOC_4_gh:noexport: | ||
- [[#links][Links]] | ||
- [[#foo][FOO]] | ||
- [[#bar][BAR]] | ||
- [[#baz][BAZ]] | ||
|
||
* Links | ||
|
||
[[https://github.com/syl20bnr/spacemacs/blob/master/doc/FAQ.org#os-x][Link to FAQ "OS X" heading]] | ||
|
||
[[https://www.google.com][Link to www.google.com]] | ||
|
||
[[https://github.com/syl20bnr/spacemacs/blob/master/doc/VIMUSERS.org#sessions]] | ||
|
||
[[https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bfun/emoji/README.org][Link to Emoji layer README.org]] | ||
|
||
* FOO | ||
|
||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed conseq | ||
|
||
* BAR | ||
|
||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed conseq | ||
|
||
* BAZ | ||
|
||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed conseq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(load-file "./doc-fmt/toc-org.el") | ||
(defun toc-apply () | ||
(toc-org-insert-toc) | ||
(save-buffer)) |
Oops, something went wrong.