aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+orbitalquark@users.noreply.github.com>2020-09-04 23:33:02 -0400
committermitchell <70453897+orbitalquark@users.noreply.github.com>2020-09-04 23:33:02 -0400
commit7a98e09ae4b424031835cdb8986d93926c7ac0bd (patch)
tree65dcff0f522310d142943701fd4b60df29ffcf24
parente6feddc952ecb232ac0304ffa698ae707ac39cdb (diff)
downloadtextadept-7a98e09ae4b424031835cdb8986d93926c7ac0bd.tar.gz
textadept-7a98e09ae4b424031835cdb8986d93926c7ac0bd.zip
Moved all top-level .md files into docs/ except README.md.
Also fixed lack of header anchors in generated HTML.
-rw-r--r--README.md4
-rw-r--r--docs/changelog.md (renamed from CHANGELOG.md)2
-rw-r--r--docs/faq.md (renamed from FAQ.md)54
-rw-r--r--docs/index.html20
-rw-r--r--docs/manual.md4
-rw-r--r--docs/media.md (renamed from MEDIA.md)0
-rw-r--r--docs/thanks.md (renamed from THANKS.md)8
-rwxr-xr-xscripts/gen_doc.lua28
-rw-r--r--src/Makefile7
9 files changed, 63 insertions, 64 deletions
diff --git a/README.md b/README.md
index 1cbb8ef1..7267c97a 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ Manual and exhaustive API documentation.
[1]: https://foicica.com/textadept/manual.html
[2]: https://foicica.com/textadept/api.html
-[Textadept Quick Reference]: https://foicica.com/textadept/MEDIA.html#Book
+[Textadept Quick Reference]: https://foicica.com/textadept/media.html#Book
## Compile
@@ -136,6 +136,6 @@ and submit patches either to the [mailing list][], or to me personally
(mitchell.att.foicica.com).
[donation]: https://gum.co/textadept
-[book]: https://foicica.com/textadept/MEDIA.html#Book
+[book]: https://foicica.com/textadept/media.html#Book
[open source]: https://foicica.com/hg/textadept
[mailing list]: http://foicica.com/lists
diff --git a/CHANGELOG.md b/docs/changelog.md
index 38716378..f51c3868 100644
--- a/CHANGELOG.md
+++ b/docs/changelog.md
@@ -7,7 +7,7 @@
[Atom Feed]: feed
[PGP Public Key]: https://foicica.com/foicica.pgp
[donate]: http://gum.co/textadept
-[book]: MEDIA.html#Book
+[book]: media.html#Book
## 11.0 alpha 3 (01 Aug 2020)
diff --git a/FAQ.md b/docs/faq.md
index 9091ea1b..8e33114b 100644
--- a/FAQ.md
+++ b/docs/faq.md
@@ -9,7 +9,7 @@ Each download contains 2 executables: a GUI version and a terminal version.
Furthermore, the Windows and macOS packages bundle in GTK runtimes, accounting
for some 3/4 of the total application size. (GTK is the cross-platform GUI
toolkit Textadept uses.) Then, starting in version 10, in order to be able to
-run on older Linux systems whose libstdc++ does not support newer C++11 symbols,
+run on older Linux systems whose libstdc++ does not support newer C++ symbols,
the Linux executables statically link in a newer version of libstdc++. Finally,
nightly builds are compiled with debug symbols enabled in order to aid debugging
of various issues.
@@ -17,20 +17,26 @@ of various issues.
- - -
**Q:**
-On Linux I get a `error while loading shared libraries: <lib>: cannot open`
-`shared object file: No such file or directory` when trying to run Textadept,
-or I get odd behavior in the terminal version, even crashes. How do I fix it?
+On Linux I either get one of the following error messages when trying to run
+Textadept, or I get odd behavior in the terminal version, even crashes.
+
+* `error while loading shared libraries: <lib>: cannot open shared object
+ file: No such file or directory`
+* `/<path>/libc.so.6: version 'GLIBC_<version>' not found`
+
+How do I fix this?
**A:**
-It is difficult to provide a binary that runs on all Linux platforms since the
-library versions installed vary widely from distribution to distribution. For
-example, "libpng14" was available for many distributions starting in late 2009
-while Ubuntu 12.04 (circa 2012) used "libpng12". More recently, some
-distributions have started using "libncurses6" while many distributions are
-still on "libncurses5". Unfortunately in these cases, the best idea is to
-[compile][] Textadept. This process is actually very simple though. Only the
-GTK development libraries are needed for the GUI version. (A development library
-for a curses implementation is required for the terminal version.)
+Short answer: you will need to [compile][] Textadept manually for your system,
+which is a very straightforward and easy process.
+
+Long answer: it is difficult to provide a binary that runs on all Linux
+platforms since the library versions installed vary widely from distribution to
+distribution. For example, "libpng14" was available for many distributions
+starting in late 2009 while Ubuntu 12.04 (circa 2012) used "libpng12". More
+recently, some distributions have started using "libncurses6" while many
+distributions are still on "libncurses5". The only way to avoid problems that
+stem from these cases is to compile Textadept for the target system.
[compile]: manual.html#Compiling
@@ -63,7 +69,7 @@ When I open a file in a non-English language, I see a lot of strange characters.
Textadept was not able to detect the file's encoding correctly. You'll need to
[help it][].
-[help it]: manual.html#Buffer.Encodings
+[help it]: manual.html#Encoding
- - -
@@ -77,7 +83,7 @@ The LuaDoc describes [compile and run commands][] and you can configure them in
your [preferences][].
[compile and run commands]: api.html#_M.Compile.and.Run
-[preferences]: manual.html#Preferences
+[preferences]: manual.html#...textadept
- - -
@@ -120,11 +126,10 @@ seem to work fine. rxvt and rxvt-unicode do not work out of the box, but may be
configurable.
Please see the [terminal version compatibility][] section of the appendix. If
-the feature in question is not listed there, it may be a bug. Please [contact][]
-me with any bug reports.
+the feature in question is not listed there, it may be a bug. Please contact
+me (mitchell.att.foicica.com) with any bug reports.
[terminal version compatibility]: manual.html#Terminal.Version.Compatibility
-[contact]: README.html#Contact
- - -
@@ -178,16 +183,3 @@ and then the "Change high DPI settings" button. Check the "Override high DPI
scaling" checkbox towards the bottom of the pop-up dialog. The next time you
run Textadept, the fonts should look much better. You may have to tweak other
settings in the dialog, but the above worked for me.
-
-- - -
-
-**Q:**
-When I use Mercurial >= 3.9 to clone Textadept's source code repository, I get
-an "unsupported protocol" error related to TLS. How do I get around this?
-
-**A:**
-Set `hostsecurity.foicica.com:minimumprotocol=tls1.0` in your Mercurial
-configuration, as stated by the error message. Then try cloning again.
-
-- - -
-
diff --git a/docs/index.html b/docs/index.html
index 435d3f18..4c289c62 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -72,8 +72,8 @@
<hr style="margin: 0.25em 0.5em 0.25em 0.5em;" />
<ul>
<li><a href="http://foicica.com/hg/textadept">Source</a></li>
- <li><a href="CHANGELOG.html">Other versions</a></li>
- <li><a href="CHANGELOG.html">PGP signatures</a></li>
+ <li><a href="changelog.html">Other versions</a></li>
+ <li><a href="changelog.html">PGP signatures</a></li>
</ul>
<h2>Nightly<a href="#nightly">*</a> Builds</h2>
@@ -96,7 +96,7 @@
<h2>Quick Reference</h2>
<p style="margin: 0.25em 0 0.25em 0.5em;">
- <a href="MEDIA.html#Book">
+ <a href="media.html#Book">
<img src="book/ta_quickref_small.png" alt="Cover"
style="border-width: 1px; margin-top: 0.25em;" />
</a>
@@ -110,7 +110,7 @@
<p style="font-size: smaller; font-weight: bold;">
Please
<a href="https://gum.co/textadept?wanted=true">donate</a> or purchase
- the <a href="MEDIA.html#Book">quick reference</a> to fund continuous
+ the <a href="media.html#Book">quick reference</a> to fund continuous
development.
</p>
@@ -255,7 +255,7 @@
<div class="left-col">
<h3>Quick Reference</h3>
<p style="float: left; margin-top: 0;">
- <a href="MEDIA.html#Book">
+ <a href="media.html#Book">
<img src="book/ta_quickref_small.png" alt="Cover2"
style="border-width: 1px;" />
</a>
@@ -275,7 +275,7 @@
yourself. If you&rsquo;re not completely satisfied, contact us on
the <a href="http://foicica.com/lists">mailing list</a> or e-mail me
personally (mitchell.att.foicica.com). You may also fork the
- project, submit patches, or <a href="THANKS.html#Sponsors">sponsor a
+ project, submit patches, or <a href="thanks.html#Sponsors">sponsor a
feature</a>. Textadept is 100% open source.
</p>
<p style="background-color: #80cc80; color: #4d4d4d; font-size: 1.5em;
@@ -292,7 +292,7 @@
<ul style="margin: 1em 1em 1em 2em;">
<li>
- Textadept has a <a href="CHANGELOG.html">proven track record</a>,
+ Textadept has a <a href="changelog.html">proven track record</a>,
with at least one release every 2 months for 8+ years and no signs
of inactivity. Also, as an open-source project, the editor will
never fade away.
@@ -347,10 +347,10 @@
<hr style="clear: both;" />
<p style="text-align: center;">
- <a href="FAQ.html">FAQ</a> &middot;
- <a href="MEDIA.html">Media</a> &middot;
+ <a href="faq.html">FAQ</a> &middot;
+ <a href="media.html">Media</a> &middot;
<a href="/stats.html#Textadept">Stats</a> &middot;
- <a href="THANKS.html">Credits</a>
+ <a href="thanks.html">Credits</a>
</p>
<hr style="clear: both;" />
diff --git a/docs/manual.md b/docs/manual.md
index d4061b39..70adad34 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -345,9 +345,9 @@ you need Textadept to see. For example:
challenging, since the versions of software installed vary widely from
distribution to distribution. If you get errors like:
- * `/<path>/libc.so.6: version 'GLIBC_<version>' not found`
* `error while loading shared libraries: <lib>: cannot open shared object
file: No such file or directory`
+ * `/<path>/libc.so.6: version 'GLIBC_<version>' not found`
you will need to [compile](#Compiling) Textadept manually for your system, which
is a very straightforward and easy process.
@@ -1539,7 +1539,7 @@ in a convenient and easy-to-use manner.
[event]: api.html#events
[spawn]: api.html#os.spawn
[Lua API]: api.html
-[Textadept Quick Reference]: MEDIA.html#Book
+[Textadept Quick Reference]: media.html#Book
### Generate Autocompletion and Documentation Files
diff --git a/MEDIA.md b/docs/media.md
index 8411bde4..8411bde4 100644
--- a/MEDIA.md
+++ b/docs/media.md
diff --git a/THANKS.md b/docs/thanks.md
index 6a6aff75..b1e3d56e 100644
--- a/THANKS.md
+++ b/docs/thanks.md
@@ -5,8 +5,7 @@ Textadept the amazing editor that it is today.
## Sponsors
-=[The Library of the University of Antwerp][]=
- reST and YAML lexers and modules
+* [The Library of the University of Antwerp][]: reST and YAML lexers and modules
[The Library of the University of Antwerp]: http://www.uantwerpen.be
@@ -66,6 +65,5 @@ private contract work related to Textadept.
* Vais Salikhov
* Vladimir Lomov
-If I have left off your name, please [contact me][]. I am very sorry about that.
-
-[contact me]: README.html#Contact
+If I have left off your name, please contact me (mitchell.att.foicica.com). I am
+very sorry about that.
diff --git a/scripts/gen_doc.lua b/scripts/gen_doc.lua
index 1d317935..fff69a12 100755
--- a/scripts/gen_doc.lua
+++ b/scripts/gen_doc.lua
@@ -1,11 +1,23 @@
#!/usr/bin/lua
--- Part of a pipeline that fills in simple {{ variable }} templates when
--- generating documentation offline.
--- cat file.md | markdown | gen_doc > file.html
+-- Filters the given file through markdown, replaces simple {{ variable }}
+-- templates, and saves the result to an HTML file of the same name for offline
+-- documentation generation.
-local html = io.read('*a')
-local f = io.open('../docs/_layouts/default.html')
-io.write(
- f:read('*a'):gsub('{{ page.title }}', html:match('<h%d>([^<]+)')):
- gsub('{{ content }}', (html:gsub('%%', '%%%%'))))
+-- Filter the file through markdown using TOC generation in order to get header
+-- anchors, but ignore the actual TOC.
+local name = arg[1]
+local f = io.open(name, 'r')
+local markdown = f:read('*a')
f:close()
+local p = io.popen('markdown -f toc -T ' .. name)
+local html = p:read('*a'):match('^.-\n</ul>\n(.+)$')
+p:close()
+
+-- Fill in HTML layout with markdown content.
+f = io.open('../docs/_layouts/default.html')
+html = f:read('*a'):gsub('{{ page.title }}', html:match('<h%d.->([^<]+)')):
+ gsub('{{ content }}', (html:gsub('%%', '%%%%')))
+f:close()
+
+-- Write to HTML file.
+io.open(name:gsub('^(.+)%.md$', '%1.html'), 'wb'):write(html):close()
diff --git a/src/Makefile b/src/Makefile
index bd49890c..8e0a2b98 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -270,11 +270,8 @@ clean: ; rm -f *.o ../textadept*
ta_home = $(shell dirname `pwd`)
docs: manual luadoc
-manual: ../*.md ../docs/manual.md
- for file in $^; do \
- markdown $$file | ../scripts/gen_doc.lua > \
- ../docs/`basename $$file .md`.html; \
- done
+manual: $(addprefix ../docs/,manual.md changelog.md faq.md media.md thanks.md)
+ for file in $^; do ../scripts/gen_doc.lua $$file; done
sed -i -e "s/Textadept Manual/Textadept $(subst _, ,$(version)) Manual/;" \
../docs/manual.html
luadoc: ../modules ../core ../lexers/lexer.lua | ../modules/lua/lua.luadoc