diff --git a/README.md b/README.md index 8661afe..bf48c56 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,96 @@ -# HTML Tidy with HTML5 support +# HTACG HTML Tidy -All READMEs and related materials can be found in [README/][1]. +All other READMEs and related materials can be found in [README/][100]. Although all of our materials should be linked in this README, be sure to check this directory for documents we’ve not yet added to this document. -For build instructions please see [README/README.md][2]. +## Building HTML Tidy - [1]: https://github.com/htacg/tidy-html5/tree/master/README - [2]: https://github.com/htacg/tidy-html5/blob/master/README/README.md - \ No newline at end of file + - For build instructions please see [README/BUILD.md][115]. + +## Branches and Versions + +Learn about which branches are available, which branch you should use, and how HTML Tidy’s versioning scheme works. + + - Learn about version numbering in [README/VERSION.md][160]. + - Learn about our repository branches in [README/BRANCHES.md][110]. + +## Contributing and Development Guides + +We gladly accept PRs! Read about some of our contribution guidelines, and check out some of the additional explanatory documents that will aid your understanding of how to accomplish certain things in HTML Tidy. + +### General Contribution Guidelines + +These are some general guidelines that will help you help us when it comes to making your own contributions to HTML Tidy. + + - Learn about our contributing guidelines in [README/CONTRIBUTING.md][125]. + - Understand HTML Tidy’s source code style in [README/CODESTYLE.md][120]. + +### Adding Features Guides + +When you’re ready to add a great new feature, these write-ups may be useful. + + - Learn how to add new element attributes to HTML Tidy by reading [README/ATTRIBUTES.md][105]. + - Discover how to add new tags to Tidy in [README/TAGS.md][130]. + - If you want to add new messages to Tidy, read [README/MESSAGE.md][150]. + - Configuration options can be added according to [README/OPTIONS.md][155]. + +### Language Localization Guides + +Tidy supports localization, and welcomes translations into various languages. Please read up on how to localize HTML Tidy. + + - The general README for localizing can be found in [/README/LOCALIZE.md][140]. + - And [/localize/README.md][145] contains specific instructions for localizing. + + +## Other Important Links + + - site: [http://www.html-tidy.org/][4] + - source: [https://github.com/htacg/tidy-html5][5] + - binaries: [http://binaries.html-tidy.org][6] + - bugs: [https://github.com/htacg/tidy-html5/issues][7] + - list: [https://lists.w3.org/Archives/Public/html-tidy/][8] + - api and quickref: [http://api.html-tidy.org/][9] + + [4]: http://www.html-tidy.org/ + [5]: https://github.com/htacg/tidy-html5 + [6]: http://binaries.html-tidy.org + [7]: https://github.com/htacg/tidy-html5/issues + [8]: https://lists.w3.org/Archives/Public/html-tidy/ + [9]: http://api.html-tidy.org/ + + +## History + +This repository should be considered canonical for HTML Tidy as of 2015-January-15. + + - This repository originally transferred from [w3c.github.com/tidy-html5][20], now redirected to the current site. + + - First moved to Github from [tidy.sourceforge.net][21]. Note, this site is kept only for historic reasons, and is not now well maintained. + +**Tidy is the granddaddy of HTML tools, with support for modern standards.** Have fun... + + [20]: http://w3c.github.com/tidy-html5/ + [21]: http://tidy.sourceforge.net + + +## License + +HTML Tidy and LibTidy are free and open source software with a permissive license. + + - You can read the complete license in [README/LICENSE.md][135]. + + + + [100]: README/ + [105]: README/ATTRIBUTES.md + [110]: README/BRANCHES.md + [115]: README/BUILD.md + [120]: README/CODESTYLE.md + [125]: README/CONTRIBUTING.md + [130]: README/TAGS.md + [135]: README/LICENSE.md + [140]: /README/LOCALIZE.md + [145]: /localize/README.md + [150]: README/MESSAGE.md + [155]: README/OPTIONS.md + [160]: README/VERSION.md + diff --git a/README/ATTRIBUTES.md b/README/ATTRIBUTES.md index b4ef111..79ec167 100644 --- a/README/ATTRIBUTES.md +++ b/README/ATTRIBUTES.md @@ -1,21 +1,26 @@ # Tidy Element Attributes -This is about adding a **new** `attribute=value` for one or more html `element`, here called `tags`. +This is about adding a **new** HTML attribute to one or more HTML tags, i.e., a new attribute such as `attribute=value`. -Tidy supports a large number of `attributes`, first defined in `tidyenum.h`, to give it a value, then defined in `attrs.c` to give it a unique **string** name, and a `function` to verify the atrribute **value**. Then in `attrdict.c` the attribute is defined, giving what version(s) of html support this attribute. Finally, what tags support this attrinute, is done in `tags.c`, where each attribute is allowed on that tag, or not, in the `tag_defs[]` table. +Tidy’s large number of attributes are supported via number of files: + + - `tidyenum.h` is where you first define a new attribute in order to give it an internal value. + - `attrs.c` is where you give a unique **string** name to the attribute, as well as a **function** to verify the **value**. + - `attrdict.c` further refines the definition of your attribute, specifying which version(s) of HTML support this attribute. + - `tags.c`, finally, determines which tags support the attribute, in the `tag_defs[]` table. So, to add a new `attribute=value`, on one or more existing tags, consists of the following simple steps - - 1. tidyenum.h - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. While there were some initial steps to keep this `TidyAttrId` enumeration alphabetic, now just add the new `TidyAttr_XXXX` just before the last entry 'N_TIDY_ATTRIBS'. + 1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. While there were some initial steps to keep this `TidyAttrId` enumeration alphabetic, now just add the new `TidyAttr_XXXX` just before the last entry `N_TIDY_ATTRIBS`. - 2. attrs.c - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined. + 2. `attrs.c` - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined. - 3. attrdict.c - If this attribute only relates to specific `tags`, then it should be added to their list. There are some `general` attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly. + 3. `attrdict.c` - If this attribute only relates to specific tags, then it should be added to their list. There are some general attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly. - 4. tags.c - Now the new attribute will be verified for each tag it is associate with in the `tag_defs[]` table. Like for example the `