Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textile markup support #786

Closed
snej opened this issue Jan 10, 2015 · 9 comments
Closed

Textile markup support #786

snej opened this issue Jan 10, 2015 · 9 comments

Comments

@snej
Copy link

snej commented Jan 10, 2015

It would be nice to support Textile markup in addition to Markdown.

I use Markdown nowadays, but I've got a legacy of old blog content that I formatted in Textile. To switch my blog to Hugo I'd need either a Textile processor in Hugo, or some kind of tool I could run to convert my .textile files to .md.

This may be related to #234.

@snej
Copy link
Author

snej commented Jan 10, 2015

Ah, looks like Pandoc is a solution for converting Textile—>Markdown. I'll probably go that route.

@anthonyfok
Copy link
Member

For reference, there is a preliminary Textile processor written in Go: https://github.com/SoCloz/gotextile

It seems to work for the most basic tags, though there is a substantial TODO list too.

@thomasmodeneis
Copy link

What are the benefits for the community when comparing Markdown vs Textile ?
Does this justify the development effort to bring this functionality to Hugo?
Cheers

@anthonyfok
Copy link
Member

This is free / open-source software, and often people contribute to scratch their own itch. 😉 So, if someone people really want it, they will contribute. ;-)

Meanwhile, Hugo already supports reStructuredText through the help of an external helper, and a there is a similar Issue #470 and an experimental Pull Request for AsciiDoc too which seems to have high demand. If there is a demand for it, Textile support could be added the same way, with an external helper with relative ease. (No, I don't think gotextile is quite ready yet.)

So yes, if there is enough of an itch, or if there is enough of a demand, sooner or later, someone—a new contributor perhaps—will step up to the challenge. ;-) If not, that's OK too.

Hope this answers your question, @thomasmodeneis: Development efforts to bring Textile support to Hugo, if any, will come from new developers who really really want it. I don't think there is any current plan for core Hugo developers to spend time on it unless there is a huge demand like all the +1's in #470, so you don't have to worry. ;-)

(Disclaimer: I am not a core developer. I am just helping out with "triaging the bug reports" and looking at the feasibility, and leaving it at that, in case any new developers were to be interested to contribute.)

In the meantime, as @snej has suggested, pandoc does a good job converting Textile to Markup.

@gour
Copy link
Contributor

gour commented May 7, 2015

@anthonyfok After some playing with Nikola static-site-generator, I consider it would be great to have general support for using Pandoc in order to process non-markdown support instead of (just) relying on specific helpers.

Nikola does it like this:

COMPILERS = {
    "rest": ('.rst', '.txt'),
    "markdown": ('.md', '.mdown', '.markdown'),
    "textile": ('.textile',),
    "txt2tags": ('.t2t',),
    "bbcode": ('.bb',),
    "wiki": ('.wiki',),
    "ipynb": ('.ipynb',),
    "html": ('.html', '.htm'),
    # PHP files are rendered the usual way (i.e. with the full templates).
    # The resulting files have .php extensions, making it possible to run
    # them without reconfiguring your server to recognize them.
    "php": ('.php',),
    # Pandoc detects the input from the source filename
    # but is disabled by default as it would conflict
    # with many of the others.
    "pandoc": ('.ad', '.md', '.rst', '.txt'),
} 

iow. one just adds external helpers to the COMPILERS and defines tuple of extensions to be used along.

@hypertexthero
Copy link

You can also use this to convert all your Textile posts to Markdown (see the 'Automated conversion from .textile to .md with pandoc' section).

@xaviershay
Copy link

xaviershay commented Jan 1, 2017

Would you consider making https://github.com/anthonyfok/hugo/blob/master/helpers/content.go#L379 configurable, such that I can register my own extensions + external handlers? That would relieve you of needing to worry about what formats people write in.

I'm looking at switching from jekyll but this is a deal breaker for me since I have so much legacy content. I need a lesstile formatter though.

(Am possibly happy to try implementing myself, but will need some guidance!)

@stale
Copy link

stale bot commented Dec 6, 2017

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Dec 6, 2017
@stale stale bot closed this as completed Dec 27, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants