Skip to content

Commit e0ac49e

Browse files
feat: turn headers into links (#192)
* feat: turn headers into links * create subsections for plugin types * change back `download-plugin` id to `download` * remove extra `#` in IDs * Update index.html * contribute section: `#editor-plugin` -> `#download`
1 parent cedc797 commit e0ac49e

File tree

2 files changed

+91
-53
lines changed

2 files changed

+91
-53
lines changed

css/style.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,13 @@ header h1 { padding-top: 0.5em; }
206206
========================================================================== */
207207

208208
a { color: #00e; }
209-
a:visited { color: #551a8b; }
210-
a:hover { color: #06e; }
209+
a:visited:not(.anchor) { color: #551a8b; }
210+
a:hover, .anchor:hover, .anchor:focus { color: #06e; }
211211
a:focus { outline: thin dotted; }
212212

213+
.anchor { color: #222; }
214+
.anchor:not(:hover):not(:focus) { text-decoration: none; }
215+
213216
/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
214217
a:hover, a:active { outline: 0; }
215218

index.html

Lines changed: 86 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@
55

66
<section id="overview">
77

8-
<h2>What is EditorConfig?</h2>
8+
<a href="#overview" class="anchor">
9+
<h2>What is EditorConfig?</h2>
10+
</a>
911

1012
<p>EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of <strong>a file format</strong> for defining coding styles and a collection of <strong>text editor plugins</strong> that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.</p>
1113

1214
</section>
1315

1416
<section id="file-format">
1517

16-
<h2>What's an EditorConfig file look like?</h2>
18+
<a href="#file-format" class="anchor">
19+
<h2>What's an EditorConfig file look like?</h2>
20+
</a>
1721

1822
<p><em>(A <a href="https://spec.editorconfig.org/">formal specification of EditorConfig</a> is also available.)</em></p>
1923

2024
<section id="example-file">
21-
<h3>Example file</h3>
25+
<a href="#example-file" class="anchor">
26+
<h3>Example file</h3>
27+
</a>
2228
<p>Below is an example <code>.editorconfig</code> file setting end-of-line and indentation styles for Python and JavaScript files.</p>
2329
<div class="code-container">
2430
{% highlight ini %}
@@ -61,7 +67,9 @@ <h3>Example file</h3>
6167
</section>
6268

6369
<section id="file-location">
64-
<h3>Where are these files stored?</h3>
70+
<a href="#file-location" class="anchor">
71+
<h3>Where are these files stored?</h3>
72+
</a>
6573

6674
<p>When opening a file, EditorConfig plugins look for a file named <code>.editorconfig</code> (all lowercase) in the directory of the opened file and in every parent directory. A search for <code>.editorconfig</code> files will stop if the root filepath is reached or an EditorConfig file with <code>root=true</code> is found.</p>
6775

@@ -71,15 +79,19 @@ <h3>Where are these files stored?</h3>
7179
</section>
7280

7381
<section id="file-format-details">
74-
<h3>File Format Details</h3>
82+
<a href="#file-format-details" class="anchor">
83+
<h3>File Format Details</h3>
84+
</a>
7585

7686
<p>EditorConfig files use an INI format that is compatible with the format used by <a href="https://docs.python.org/2/library/configparser.html">Python ConfigParser Library</a>, but <code>[</code> and <code>]</code> are allowed in the section names. The section names are filepath <a href="https://en.wikipedia.org/wiki/Glob_(programming)">globs</a> (case sensitive), similar to the format accepted by <a href="https://git-scm.com/docs/gitignore#_pattern_format">gitignore</a>. Only forward slashes (<code>/</code>, not backslashes) are used as path separators and octothorpes (<code>#</code>) or semicolons (<code>;</code>) are used for comments. Comments should go on their own lines. EditorConfig files should be UTF-8 encoded, with either <code><abbr title="Carriage Return Line Feed">CRLF</abbr></code> or <code><abbr title="Line Feed">LF</abbr></code> line separators. EditorConfig files are read top to bottom and the most recent rules found take precedence.</p>
7787

7888
<p>Filepath glob patterns and currently-supported EditorConfig properties are explained below.</p>
7989
</section>
8090

8191
<section id="wildcards">
82-
<h4>Wildcard Patterns</h4>
92+
<a href="#wildcards" class="anchor">
93+
<h4>Wildcard Patterns</h4>
94+
</a>
8395

8496
<p>Special characters recognized in section names for wildcard matching:</p>
8597

@@ -97,7 +109,9 @@ <h4>Wildcard Patterns</h4>
97109
</section>
98110

99111
<section id="supported-properties">
100-
<h4>Supported Properties</h4>
112+
<a href="#supported-properties" class="anchor">
113+
<h4>Supported Properties</h4>
114+
</a>
101115
<p>Note that not all properties are supported by every plugin. The wiki has a <a href="https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties">complete list of properties</a>.</p>
102116
<ul class="property-definitions">
103117
<li><dfn><code>indent_style</code></dfn>: set to <q>tab</q> or <q>space</q> to use hard tabs or soft tabs respectively.</li>
@@ -120,7 +134,9 @@ <h4>Supported Properties</h4>
120134

121135
<section id="pre-installed">
122136

123-
<h2>No Plugin Necessary</h2>
137+
<a href="#pre-installed" class="anchor">
138+
<h2>No Plugin Necessary</h2>
139+
</a>
124140

125141
<p>These editors come bundled with native support for EditorConfig. Everything should just work.</p>
126142

@@ -165,63 +181,80 @@ <h2>No Plugin Necessary</h2>
165181

166182
<section id="download">
167183

168-
<h2 id="editor-plugins">Download a Plugin</h2>
169-
170-
<h3>Editor</h3>
171-
<p>To use EditorConfig with one of these editors, you will need to install a plugin.</p>
172-
173-
<ul class="editor-logos">
174-
<li><a href="https://plugins.jetbrains.com/plugin/7294-editorconfig/"><img src="logos/appCode.png" alt="AppCode"><span>AppCode</span></a></li>
175-
<li><a href="https://github.com/sindresorhus/atom-editorconfig#readme"><img src="logos/atom.png" alt="Atom"><span>Atom</span></a></li>
176-
<li><a href="https://github.com/kidwm/brackets-editorconfig/"><img src="logos/brackets.png" alt="Brackets"><span>Brackets</span></a></li>
177-
<li><a href="https://plugins.jetbrains.com/plugin/7294-editorconfig/"><img src="logos/clion.png" alt="CLion"><span>CLion</span></a></li>
178-
<li><a href="https://panic.com/coda/plugins.php#Plugins"><img src="logos/coda.png" alt="Coda"><span>Coda</span></a></li>
179-
<li><a href="https://github.com/editorconfig/editorconfig-codeblocks#readme"><img src="logos/codeblocks.png" alt="Code::Block"><span>Code::Block</span></a></li>
180-
<li><a href="https://github.com/ncjones/editorconfig-eclipse#readme"><img src="logos/eclipse.png" alt="Eclipse"><span>Eclipse</span></a></li>
181-
<li><a href="https://github.com/editorconfig/editorconfig-emacs#readme"><img src="logos/emacs.png" alt="Emacs"><span>Emacs</span></a></li>
182-
<li><a href="https://github.com/nightroman/FarNet/tree/master/EditorKit"><img src="logos/far-manager.png" alt="Far Manager"><span>Far Manager</span></a></li>
183-
<li><a href="https://github.com/editorconfig/editorconfig-geany#readme"><img src="logos/geany.png" alt="Geany"><span>Geany</span></a></li>
184-
<li><a href="https://github.com/editorconfig/editorconfig-gedit#readme"><img src="logos/gedit.png" alt="Gedit"><span>Gedit</span></a></li>
185-
<li><a href="https://github.com/editorconfig/editorconfig-jedit#readme"><img src="logos/jedit.png" alt="jEdit"><span>jEdit</span></a></li>
186-
<li><a href="https://github.com/skalogryz/editorConfig/tree/master/lazideext"><img src="logos/lazarus.png" alt="Lazarus"><span>Lazarus</span></a></li>
187-
<li><a href="https://github.com/10sr/editorconfig-micro#readme"><img src="logos/micro.png" alt="Micro"><span>Micro</span></a></li>
188-
<li><a href="https://github.com/welovecoding/editorconfig-netbeans#readme"><img src="logos/NetBeans.png" alt="NetBeans"><span>NetBeans</span></a></li>
189-
<li><a href="https://github.com/editorconfig/editorconfig-notepad-plus-plus#readme"><img src="logos/notepad.png" alt="Notepad++"><span>Notepad++</span></a></li>
190-
<li><a href="https://github.com/fszymanski/pluma-plugins/tree/master/editorconfig"><img src="logos/pluma.png" alt="Pluma"><span>Pluma</span></a></li>
191-
<li><a href="https://github.com/sindresorhus/editorconfig-sublime#readme"><img src="logos/sublimetext.png" alt="Sublime Text"><span>Sublime Text</span></a></li>
192-
<li><a href="https://github.com/editorconfig/editorconfig-textadept#readme"><img src="logos/textadept.png" alt="Textadept"><span>Textadept</span></a></li>
193-
<li><a href="https://github.com/Mr0grog/editorconfig-textmate#readme"><img src="logos/textmate.png" alt="TextMate"><span>TextMate</span></a></li>
194-
<li><a href="https://open-vsx.org/extension/EditorConfig/EditorConfig"><img src="logos/vscodium.png" alt="VSCodium"><span>VSCodium</span></a></li>
195-
<li><a href="https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig"><img src="logos/visualstudio-code.png" alt="Visual Studio Code"><span>Visual Studio Code</span></a></li>
196-
</ul>
184+
<a href="#download" class="anchor">
185+
<h2>Download a Plugin</h2>
186+
</a>
187+
188+
<section id="editor-plugins">
189+
<a href="#editor-plugins" class="anchor">
190+
<h3>Editor</h3>
191+
</a>
192+
193+
<p>To use EditorConfig with one of these editors, you will need to install a plugin.</p>
194+
195+
<ul class="editor-logos">
196+
<li><a href="https://plugins.jetbrains.com/plugin/7294-editorconfig/"><img src="logos/appCode.png" alt="AppCode"><span>AppCode</span></a></li>
197+
<li><a href="https://github.com/sindresorhus/atom-editorconfig#readme"><img src="logos/atom.png" alt="Atom"><span>Atom</span></a></li>
198+
<li><a href="https://github.com/kidwm/brackets-editorconfig/"><img src="logos/brackets.png" alt="Brackets"><span>Brackets</span></a></li>
199+
<li><a href="https://plugins.jetbrains.com/plugin/7294-editorconfig/"><img src="logos/clion.png" alt="CLion"><span>CLion</span></a></li>
200+
<li><a href="https://panic.com/coda/plugins.php#Plugins"><img src="logos/coda.png" alt="Coda"><span>Coda</span></a></li>
201+
<li><a href="https://github.com/editorconfig/editorconfig-codeblocks#readme"><img src="logos/codeblocks.png" alt="Code::Block"><span>Code::Block</span></a></li>
202+
<li><a href="https://github.com/ncjones/editorconfig-eclipse#readme"><img src="logos/eclipse.png" alt="Eclipse"><span>Eclipse</span></a></li>
203+
<li><a href="https://github.com/editorconfig/editorconfig-emacs#readme"><img src="logos/emacs.png" alt="Emacs"><span>Emacs</span></a></li>
204+
<li><a href="https://github.com/nightroman/FarNet/tree/master/EditorKit"><img src="logos/far-manager.png" alt="Far Manager"><span>Far Manager</span></a></li>
205+
<li><a href="https://github.com/editorconfig/editorconfig-geany#readme"><img src="logos/geany.png" alt="Geany"><span>Geany</span></a></li>
206+
<li><a href="https://github.com/editorconfig/editorconfig-gedit#readme"><img src="logos/gedit.png" alt="Gedit"><span>Gedit</span></a></li>
207+
<li><a href="https://github.com/editorconfig/editorconfig-jedit#readme"><img src="logos/jedit.png" alt="jEdit"><span>jEdit</span></a></li>
208+
<li><a href="https://github.com/skalogryz/editorConfig/tree/master/lazideext"><img src="logos/lazarus.png" alt="Lazarus"><span>Lazarus</span></a></li>
209+
<li><a href="https://github.com/10sr/editorconfig-micro#readme"><img src="logos/micro.png" alt="Micro"><span>Micro</span></a></li>
210+
<li><a href="https://github.com/welovecoding/editorconfig-netbeans#readme"><img src="logos/NetBeans.png" alt="NetBeans"><span>NetBeans</span></a></li>
211+
<li><a href="https://github.com/editorconfig/editorconfig-notepad-plus-plus#readme"><img src="logos/notepad.png" alt="Notepad++"><span>Notepad++</span></a></li>
212+
<li><a href="https://github.com/fszymanski/pluma-plugins/tree/master/editorconfig"><img src="logos/pluma.png" alt="Pluma"><span>Pluma</span></a></li>
213+
<li><a href="https://github.com/sindresorhus/editorconfig-sublime#readme"><img src="logos/sublimetext.png" alt="Sublime Text"><span>Sublime Text</span></a></li>
214+
<li><a href="https://github.com/editorconfig/editorconfig-textadept#readme"><img src="logos/textadept.png" alt="Textadept"><span>Textadept</span></a></li>
215+
<li><a href="https://github.com/Mr0grog/editorconfig-textmate#readme"><img src="logos/textmate.png" alt="TextMate"><span>TextMate</span></a></li>
216+
<li><a href="https://open-vsx.org/extension/EditorConfig/EditorConfig"><img src="logos/vscodium.png" alt="VSCodium"><span>VSCodium</span></a></li>
217+
<li><a href="https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig"><img src="logos/visualstudio-code.png" alt="Visual Studio Code"><span>Visual Studio Code</span></a></li>
218+
</ul>
197219

198-
<div style="clear: both;"></div>
220+
<div style="clear: both;"></div>
221+
</section>
199222

200-
<h3>Headless Tool</h3>
201-
<p>To use EditorConfig with one of these headless tools, you will need to install a plugin.</p>
223+
<section id="headless-tool-plugins">
224+
<a href="#headless-tool-plugins" class="anchor">
225+
<h3>Headless Tool</h3>
226+
</a>
227+
<p>To use EditorConfig with one of these headless tools, you will need to install a plugin.</p>
202228

203-
<ul class="editor-logos">
204-
<li><a href="https://github.com/ec4j/editorconfig-ant-tasks"><img src="logos/apache-ant.png" alt="Apache Ant"><span>Apache Ant</span></a></li>
205-
<li><a href="https://github.com/ec4j/editorconfig-gradle-plugin"><img src="logos/gradle.png" alt="Gradle"><span>Gradle</span></a></li>
206-
<li><a href="https://ec4j.github.io/editorconfig-maven-plugin/"><img src="logos/maven.png" alt="Maven"><span>Maven</span></a></li>
207-
</ul>
229+
<ul class="editor-logos">
230+
<li><a href="https://github.com/ec4j/editorconfig-ant-tasks"><img src="logos/apache-ant.png" alt="Apache Ant"><span>Apache Ant</span></a></li>
231+
<li><a href="https://github.com/ec4j/editorconfig-gradle-plugin"><img src="logos/gradle.png" alt="Gradle"><span>Gradle</span></a></li>
232+
<li><a href="https://ec4j.github.io/editorconfig-maven-plugin/"><img src="logos/maven.png" alt="Maven"><span>Maven</span></a></li>
233+
</ul>
208234

209-
<div style="clear: both;"></div>
235+
<div style="clear: both;"></div>
236+
</section>
210237

211238
</section>
212239

213240
<section id="contributing">
214241

215-
<h2>Contributing to EditorConfig</h2>
242+
<a href="#contributing" class="anchor">
243+
<h2>Contributing to EditorConfig</h2>
244+
</a>
216245

217246
<section id="feedback">
218-
<h3>Give us your feedback</h3>
247+
<a href="#feedback" class="anchor">
248+
<h3>Give us your feedback</h3>
249+
</a>
219250

220251
<p>This project is greatly in need of feedback from other developers. We want to hear ideas about how to make this project better. Please use the <a href="http://groups.google.com/group/editorconfig">mailing list</a> to send an email to the EditorConfig team (subscribe by shooting an email to <a href="mailto:[email protected]">[email protected]</a>) and use the <a href="https://github.com/editorconfig/editorconfig/issues">issue tracker</a> to submit bugs (but please take a look at the <a href="https://github.com/editorconfig/editorconfig/wiki/FAQ">FAQ</a> first). Also feel free to <a href="https://twitter.com/EditorConfig">tweet at us</a>.</p>
221252
</section>
222253

223254
<section id="create-a-plugin">
224-
<h3>Create an editor plugin</h3>
255+
<a href="#create-a-plugin" class="anchor">
256+
<h3>Create an editor plugin</h3>
257+
</a>
225258

226259
<p>
227260
EditorConfig editor plugins must follow the <a href="https://spec.editorconfig.org">specifications</a>. They can be developed with the help from one of the EditorConfig core libraries.
@@ -247,9 +280,11 @@ <h3>Create an editor plugin</h3>
247280
</section>
248281

249282
<section id="contributors">
250-
<h3>Main Contributors</h3>
283+
<a href="#contributors" class="anchor">
284+
<h3>Main Contributors</h3>
285+
</a>
251286

252-
<p>We have many awesome contributors contributing to the specification, core library, and plugins. For an up-to-date list, please see the <a href="https://github.com/editorconfig/editorconfig/wiki/Board-Member">Board Members page</a> and the <a href="https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors">contributor pages</a> of the <a href="https://github.com/editorconfig/specification/graphs/contributors">specification</a>, <a href="#core-libraries">core libraries</a>, and <a href="#editor-plugins">plugins</a>.</p>
287+
<p>We have many awesome contributors contributing to the specification, core library, and plugins. For an up-to-date list, please see the <a href="https://github.com/editorconfig/editorconfig/wiki/Board-Member">Board Members page</a> and the <a href="https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors">contributor pages</a> of the <a href="https://github.com/editorconfig/specification/graphs/contributors">specification</a>, <a href="#core-libraries">core libraries</a>, and <a href="#download">plugins</a>.</p>
253288

254289
<p>
255290
Most of of EditorConfig logos were drawn by <a href="https://squirrelmuffins.com">Kat On</a> and <a href="https://pittankopta.net/">Amon Keishima</a>. Website were mainly by <a href="https://treyhunner.com">Trey Hunner</a> and <a href="https://www.topbug.net">Hong Xu</a>.

0 commit comments

Comments
 (0)