Skip to content

Commit

Permalink
See #246. Remove .html extension from pages & links
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavin001 committed Apr 5, 2020
1 parent 3f24bf1 commit 6abf3d5
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ See https://github.com/Unibeautify/website/blob/master/scripts/beautifiers.ts fo
<!--START:SUPPORT-TABLE-->
| # | 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 |
<!--END:SUPPORT-TABLE-->

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion docs/editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href=\"https://github.com/Glavin001/atom-beautify\">Atom-Beautify</a>, format/beautify on save can be enabled or disabled for each language individually. For example, for language <a href=\"https://unibeautify.com/docs/language-html.html\">HTML</a> go into Atom-Beautify's package settings (<strong>Atom ➔ Preferences ➔ Search for atom-beautify</strong>), find <a href=\"https://unibeautify.com/docs/language-html.html\">HTML</a>, and toggle the <strong>Beautify On Save</strong> option."
"text": "In <a href=\"https://github.com/Glavin001/atom-beautify\">Atom-Beautify</a>, format/beautify on save can be enabled or disabled for each language individually. For example, for language <a href=\"https://unibeautify.com/docs/language-html\">HTML</a> go into Atom-Beautify's package settings (<strong>Atom ➔ Preferences ➔ Search for atom-beautify</strong>), find <a href=\"https://unibeautify.com/docs/language-html\">HTML</a>, and toggle the <strong>Beautify On Save</strong> option."
}
}, {
"@type": "Question",
Expand Down
4 changes: 2 additions & 2 deletions docs/options-for-beautifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-docs/MarkdownBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ class Footer extends React.Component {
</div>
<div className="col-6 col-sm-4 col-lg-2">
<h5>Docs</h5>
<a href={this.docUrl('getting-started.html', this.props.language)}>Getting Started</a>
<a href={this.docUrl('cli.html', this.props.language)}>CLI</a>
<a href={this.docUrl('config-file.html', this.props.language)}>Configuration</a>
<a href={this.docUrl('options-for-languages.html', this.props.language)}>Options</a>
<a href={this.docUrl('getting-started', this.props.language)}>Getting Started</a>
<a href={this.docUrl('cli', this.props.language)}>CLI</a>
<a href={this.docUrl('config-file', this.props.language)}>Configuration</a>
<a href={this.docUrl('options-for-languages', this.props.language)}>Options</a>
</div>
<div className="col-6 col-sm-4 col-lg-2">
<h5>Community</h5>
<a href={this.pageUrl('users.html', this.props.language)}>User Showcase</a>
<a href={this.pageUrl('users', this.props.language)}>User Showcase</a>
<a
href="http://stackoverflow.com/questions/tagged/unibeautify"
target="_blank">
Expand Down Expand Up @@ -104,8 +104,8 @@ class Footer extends React.Component {
<div className="col">
{siteConfig.copyright}
</div>
<div className="col-auto align-self-end">
<a href={this.docUrl('credits.html', this.props.language)}>Credits</a>
<div className="col-auto align-self-end">
<a href={this.docUrl('credits', this.props.language)}>Credits</a>
</div>
</div>
</div>
Expand Down
32 changes: 16 additions & 16 deletions website/data/languages.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion website/pages/en/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
{
Expand Down
14 changes: 7 additions & 7 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class HomeSplash extends React.Component {
<Button href={"https://github.com/apps/unibeautify-ci"} target="_blank">
Install
</Button>
<Button href={docUrl('getting-started.html', language)}>
<Button href={docUrl('getting-started', language)}>
Documentation
</Button>
</ButtonGroup>
Expand Down Expand Up @@ -129,7 +129,7 @@ const LanguagesShowcase = () => {
<h2>{"Supported Languages"}</h2>
<div className="logos">
{showcase}
<a href={"/docs/languages.html"}>
<a href={"/docs/languages"}>
<img src={imgUrl("languages/more.png")} title={"And more..."}/>
<br/>
And more...
Expand All @@ -145,17 +145,17 @@ const Features = props => (
[
{
title: 'Unparalleled customization',
content: `Personalize your code style and create a constant style across all maintainers<br> with [40+ configuration options](${docUrl('options-for-languages.html', props.language)}).`,
content: `Personalize your code style and create a constant style across all maintainers<br> 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'
}
Expand All @@ -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'
}
Expand Down Expand Up @@ -202,7 +202,7 @@ const Showcase = props => {
</p>
<div className="logos">{showcase}</div>
<div className="more-users button-group">
<a className="button" href={pageUrl('users.html', props.language)}>
<a className="button" href={pageUrl('users', props.language)}>
More {siteConfig.title}&nbsp;
Users
</a>
Expand Down

0 comments on commit 6abf3d5

Please sign in to comment.