From 6abf3d5d53e0787ef4154df7453c58bcbbbef699 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sun, 5 Apr 2020 19:45:41 -0300 Subject: [PATCH] See #246. Remove .html extension from pages & links --- README.md | 26 +++++++++---------- docs/editors.md | 2 +- docs/options-for-beautifiers.md | 4 +-- scripts/generate-docs/MarkdownBuilder.ts | 2 +- scripts/update-readme.ts | 2 +- website/core/Footer.js | 14 +++++------ website/data/languages.yml | 32 ++++++++++++------------ website/pages/en/help.js | 2 +- website/pages/en/index.js | 14 +++++------ 9 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 2f09e00d..5cb893da 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,19 @@ See https://github.com/Unibeautify/website/blob/master/scripts/beautifiers.ts fo | # | Beautifier | Preinstalled | Documentation | | --- | --- | --- | --- | -| 1 | Black | :warning: | https://unibeautify.com/docs/beautifier-black.html | -| 2 | CSScomb | :white_check_mark: | https://unibeautify.com/docs/beautifier-csscomb.html | -| 3 | ClangFormat | :warning: | https://unibeautify.com/docs/beautifier-clangformat.html | -| 4 | ESLint | :white_check_mark: | https://unibeautify.com/docs/beautifier-eslint.html | -| 5 | Gofmt | :warning: | https://unibeautify.com/docs/beautifier-gofmt.html | -| 6 | JS-Beautify | :white_check_mark: | https://unibeautify.com/docs/beautifier-js-beautify.html | -| 7 | PHP-CS-Fixer | :warning: | https://unibeautify.com/docs/beautifier-php-cs-fixer.html | -| 8 | PHP_CodeSniffer | :warning: | https://unibeautify.com/docs/beautifier-php_codesniffer.html | -| 9 | Prettier | :white_check_mark: | https://unibeautify.com/docs/beautifier-prettier.html | -| 10 | Pretty Diff | :white_check_mark: | https://unibeautify.com/docs/beautifier-pretty-diff.html | -| 11 | TSLint | :white_check_mark: | https://unibeautify.com/docs/beautifier-tslint.html | -| 12 | YAPF | :warning: | https://unibeautify.com/docs/beautifier-yapf.html | -| 13 | sqlformat | :warning: | https://unibeautify.com/docs/beautifier-sqlformat.html | +| 1 | Black | :warning: | https://unibeautify.com/docs/beautifier-black | +| 2 | CSScomb | :white_check_mark: | https://unibeautify.com/docs/beautifier-csscomb | +| 3 | ClangFormat | :warning: | https://unibeautify.com/docs/beautifier-clangformat | +| 4 | ESLint | :white_check_mark: | https://unibeautify.com/docs/beautifier-eslint | +| 5 | Gofmt | :warning: | https://unibeautify.com/docs/beautifier-gofmt | +| 6 | JS-Beautify | :white_check_mark: | https://unibeautify.com/docs/beautifier-js-beautify | +| 7 | PHP-CS-Fixer | :warning: | https://unibeautify.com/docs/beautifier-php-cs-fixer | +| 8 | PHP_CodeSniffer | :warning: | https://unibeautify.com/docs/beautifier-php_codesniffer | +| 9 | Prettier | :white_check_mark: | https://unibeautify.com/docs/beautifier-prettier | +| 10 | Pretty Diff | :white_check_mark: | https://unibeautify.com/docs/beautifier-pretty-diff | +| 11 | TSLint | :white_check_mark: | https://unibeautify.com/docs/beautifier-tslint | +| 12 | YAPF | :warning: | https://unibeautify.com/docs/beautifier-yapf | +| 13 | sqlformat | :warning: | https://unibeautify.com/docs/beautifier-sqlformat | ## Contributing diff --git a/docs/editors.md b/docs/editors.md index b618bd20..20ff0482 100644 --- a/docs/editors.md +++ b/docs/editors.md @@ -162,7 +162,7 @@ WebStorm is not yet supported. Please help us by contributing! Thanks in advance "name": "How to format on save in Atom?", "acceptedAnswer": { "@type": "Answer", - "text": "In Atom-Beautify, format/beautify on save can be enabled or disabled for each language individually. For example, for language HTML go into Atom-Beautify's package settings (Atom ➔ Preferences ➔ Search for atom-beautify), find HTML, and toggle the Beautify On Save option." + "text": "In Atom-Beautify, format/beautify on save can be enabled or disabled for each language individually. For example, for language HTML go into Atom-Beautify's package settings (Atom ➔ Preferences ➔ Search for atom-beautify), find HTML, and toggle the Beautify On Save option." } }, { "@type": "Question", diff --git a/docs/options-for-beautifiers.md b/docs/options-for-beautifiers.md index c35b49cf..b3402426 100644 --- a/docs/options-for-beautifiers.md +++ b/docs/options-for-beautifiers.md @@ -16,7 +16,7 @@ LANGUAGE_NAME: # Language path: "/absolute/path/to/executable" ``` -For example, consider the [PHP-CS-Fixer beautifier](/docs/beautifier-php-cs-fixer.html): +For example, consider the [PHP-CS-Fixer beautifier](/docs/beautifier-php-cs-fixer): ```yaml --- @@ -35,7 +35,7 @@ After enabling `prefer_beautifier_config` option for a beautifier Unibeautify wi If the beautifier's configuration file is found then Unibeautify's own configuration file (e.g. `.unibeautifyrc`) will be ignored. This is useful when Unibeautify does not support an option and you want more control over a specific beautifier. -> Only certain beautifiers support the `prefer_beautifier_config` option. See the `Advanced` section on a beautifier's page to see what beautifier options are supported. For example, see the [PHP-CS-Fixer beautifier](/docs/beautifier-php-cs-fixer.html#advanced). +> Only certain beautifiers support the `prefer_beautifier_config` option. See the `Advanced` section on a beautifier's page to see what beautifier options are supported. For example, see the [PHP-CS-Fixer beautifier](/docs/beautifier-php-cs-fixer#advanced). ### Config File Path You can also specify the absolute path to the beautifier's config file by putting a string in the `prefer_beautifier_config` option. It will otherwise look in the directory of the file being beautified, and if it doesn't find it there, will go to the parent directory. diff --git a/scripts/generate-docs/MarkdownBuilder.ts b/scripts/generate-docs/MarkdownBuilder.ts index 45dd271b..7f8850c1 100644 --- a/scripts/generate-docs/MarkdownBuilder.ts +++ b/scripts/generate-docs/MarkdownBuilder.ts @@ -59,7 +59,7 @@ export default class MarkdownBuilder { docId: string, queryParam?: string ): string { - let dest: string = `/docs/${docId}.html`; + let dest: string = `/docs/${docId}`; if (queryParam) { dest += `?${queryParam}`; } diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index 4c73ba0c..44da4e5f 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -79,7 +79,7 @@ class SupportTableReplacer extends SectionReplacer { function docUrl(beautifierName: string): string { return `https://unibeautify.com/docs/beautifier-${slugify( beautifierName - )}.html`; + )}`; } function slugify(beautifierName: string): string { diff --git a/website/core/Footer.js b/website/core/Footer.js index ea52ce86..1de32e08 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -39,14 +39,14 @@ class Footer extends React.Component {
Docs
- Getting Started - CLI - Configuration - Options + Getting Started + CLI + Configuration + Options
Community
- User Showcase + User Showcase @@ -104,8 +104,8 @@ class Footer extends React.Component {
{siteConfig.copyright}
-
- Credits +
+ Credits
diff --git a/website/data/languages.yml b/website/data/languages.yml index 128cb063..73d2ddbb 100644 --- a/website/data/languages.yml +++ b/website/data/languages.yml @@ -1,49 +1,49 @@ - name: "HTML" image: "img/languages/html5.png" - infoLink: "/docs/language-html.html" + infoLink: "/docs/language-html" - name: "CSS" image: "img/languages/css3.png" - infoLink: "/docs/language-css.html" + infoLink: "/docs/language-css" - name: "JavaScript" image: "img/languages/javascript.png" - infoLink: "/docs/language-javascript.html" + infoLink: "/docs/language-javascript" - name: "TypeScript" image: "img/languages/typescript.png" - infoLink: "/docs/language-typescript.html" + infoLink: "/docs/language-typescript" - name: "JSX (React)" image: "img/languages/react.png" - infoLink: "/docs/language-jsx.html" + infoLink: "/docs/language-jsx" - name: "Vue" image: "img/languages/vue.png" - infoLink: "/docs/language-vue.html" + infoLink: "/docs/language-vue" - name: "C++" image: "img/languages/cpp.png" - infoLink: "/docs/language-cpp.html" + infoLink: "/docs/language-cpp" - name: "Go" image: "img/languages/go.png" - infoLink: "/docs/language-go.html" + infoLink: "/docs/language-go" - name: "Objective-C" image: "img/languages/objective-c.png" - infoLink: "/docs/language-objective-c.html" + infoLink: "/docs/language-objective-c" - name: "Java" image: "img/languages/java.png" - infoLink: "/docs/language-java.html" + infoLink: "/docs/language-java" - name: "Python" image: "img/languages/python.png" - infoLink: "/docs/language-python.html" + infoLink: "/docs/language-python" - name: "PHP" image: "img/languages/php.png" - infoLink: "/docs/language-php.html" + infoLink: "/docs/language-php" - name: "GraphQL" image: "img/languages/graphql.png" - infoLink: "/docs/language-graphql.html" + infoLink: "/docs/language-graphql" - name: "Markdown" image: "img/languages/markdown.png" - infoLink: "/docs/language-markdown.html" + infoLink: "/docs/language-markdown" # - name: "Ruby" # image: "img/languages/ruby.png" -# infoLink: "/docs/language-ruby.html" +# infoLink: "/docs/language-ruby" # - name: "Swift" # image: "img/languages/swift.png" -# infoLink: "/docs/language-swift.html" +# infoLink: "/docs/language-swift" diff --git a/website/pages/en/help.js b/website/pages/en/help.js index c5e30a4b..8e058a9a 100755 --- a/website/pages/en/help.js +++ b/website/pages/en/help.js @@ -17,7 +17,7 @@ class Help extends React.Component { render() { const supportLinks = [ { - content: 'Learn more using the [documentation on this site.](/docs/getting-started.html)', + content: 'Learn more using the [documentation on this site.](/docs/getting-started)', title: 'Browse Docs', }, { diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 7aefa790..aded8ee6 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -94,7 +94,7 @@ class HomeSplash extends React.Component { - @@ -129,7 +129,7 @@ const LanguagesShowcase = () => {

{"Supported Languages"}

{showcase} - +
And more... @@ -145,17 +145,17 @@ const Features = props => ( [ { title: 'Unparalleled customization', - content: `Personalize your code style and create a constant style across all maintainers
with [40+ configuration options](${docUrl('options-for-languages.html', props.language)}).`, + content: `Personalize your code style and create a constant style across all maintainers
with [40+ configuration options](${docUrl('options-for-languages', props.language)}).`, image: imgUrl('icons/cog.svg'), imageAlign: 'top' }, { title: 'Diligent documentation', - content: `Up-to-date documentation with [hundreds of examples](${docUrl('contributing-examples.html')}) is automatically generated from beautifier, language, and option metadata.`, + content: `Up-to-date documentation with [hundreds of examples](${docUrl('contributing-examples')}) is automatically generated from beautifier, language, and option metadata.`, image: imgUrl('icons/book.svg'), imageAlign: 'top' }, { title: 'One to rule them all', - content: `Enable multiple beautifiers for each language. For example, easily combine [Prettier](${docUrl('beautifier-prettier.html', props.language)}) with [ESLint](${docUrl('beautifier-eslint.html', props.language)}) by simply changing your config file.`, + content: `Enable multiple beautifiers for each language. For example, easily combine [Prettier](${docUrl('beautifier-prettier', props.language)}) with [ESLint](${docUrl('beautifier-eslint', props.language)}) by simply changing your config file.`, image: imgUrl('icons/bag.svg'), imageAlign: 'top' } @@ -170,7 +170,7 @@ const UnibeautifyCi = () => ( [ { title: `![](${imgUrl('icons/tasks.svg')}#icon) GitHub Automation`, - content: 'Automatically beautify your code on each push with [Unibeautify CI](docs/ci.html)! View a report via [GitHub\'s Checks API](https://blog.github.com/2018-05-07-introducing-checks-api/) and easily resolve formatting changes by simply merging a branch, allowing you to quickly fix your code without ever leaving GitHub!', + content: 'Automatically beautify your code on each push with [Unibeautify CI](docs/ci)! View a report via [GitHub\'s Checks API](https://blog.github.com/2018-05-07-introducing-checks-api/) and easily resolve formatting changes by simply merging a branch, allowing you to quickly fix your code without ever leaving GitHub!', image: imgUrl('previews/ubi-ci-demo.png'), imageAlign: 'right' } @@ -202,7 +202,7 @@ const Showcase = props => {

{showcase}
- + More {siteConfig.title}  Users