Skip to content

Commit 0889fb8

Browse files
authored
Merge branch 'master' into expand-readme
2 parents 7280dfa + df9cd02 commit 0889fb8

File tree

14 files changed

+294
-16
lines changed

14 files changed

+294
-16
lines changed

.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
BUNDLE_PATH: "vendor/bundle"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ _site/
77
.jekyll-metadata
88

99
# Ignore folders generated by Bundler
10-
.bundle/
10+
.bundle/**
11+
!.bundle/config
1112
vendor/

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://rubygems.org'
22
gem 'github-pages', group: :jekyll_plugins
3-
gem "webrick", ">= 2.2.8"
3+
gem "webrick", ">= 1.8"
44

55

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ $ docker run --rm --volume="$PWD:/srv/jekyll:Z" -it jekyll/jekyll jekyll serve
2929
### References
3030

3131
- [Jekyll installation guidelines](https://jekyllrb.com/docs/installation/)
32-
- [Ruby 101 notes](https://jekyllrb.com/docs/ruby-101/)
32+
- [Ruby 101 notes](https://jekyllrb.com/docs/ruby-101/)

_includes/anchor_headings.html

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
{% capture headingsWorkspace %}
2+
{% comment %}
3+
Copyright (c) 2018 Vladimir "allejo" Jimenez
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.
25+
{% endcomment %}
26+
{% comment %}
27+
Version 1.0.13
28+
https://github.com/allejo/jekyll-anchor-headings
29+
30+
"Be the pull request you wish to see in the world." ~Ben Balter
31+
32+
Usage:
33+
{% include anchor_headings.html html=content anchorBody="#" %}
34+
35+
Parameters:
36+
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
37+
38+
Optional Parameters:
39+
* beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content
40+
* headerAttrs (string) : '' - Any custom HTML attributes that will be added to the heading tag; you may NOT use `id`;
41+
the `%heading%` and `%html_id%` placeholders are available
42+
* anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `<a>` tag; you may NOT use `href`, `class` or `title`;
43+
the `%heading%` and `%html_id%` placeholders are available
44+
* anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available
45+
* anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space
46+
* anchorTitle (string) : '' - The `title` attribute that will be used for anchors
47+
* h_min (int) : 1 - The minimum header level to build an anchor for; any header lower than this value will be ignored
48+
* h_max (int) : 6 - The maximum header level to build an anchor for; any header greater than this value will be ignored
49+
* bodyPrefix (string) : '' - Anything that should be inserted inside of the heading tag _before_ its anchor and content
50+
* bodySuffix (string) : '' - Anything that should be inserted inside of the heading tag _after_ its anchor and content
51+
* generateId (true) : false - Set to true if a header without id should generate an id to use.
52+
53+
Output:
54+
The original HTML with the addition of anchors inside of all of the h1-h6 headings.
55+
{% endcomment %}
56+
57+
{% assign minHeader = include.h_min | default: 1 %}
58+
{% assign maxHeader = include.h_max | default: 6 %}
59+
{% assign beforeHeading = include.beforeHeading %}
60+
{% assign headerAttrs = include.headerAttrs %}
61+
{% assign nodes = include.html | split: '<h' %}
62+
63+
{% capture edited_headings %}{% endcapture %}
64+
65+
{% for _node in nodes %}
66+
{% capture node %}{{ _node | strip }}{% endcapture %}
67+
68+
{% if node == "" %}
69+
{% continue %}
70+
{% endif %}
71+
72+
{% assign nextChar = node | replace: '"', '' | strip | slice: 0, 1 %}
73+
{% assign headerLevel = nextChar | times: 1 %}
74+
75+
<!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's see if we need to fix it -->
76+
{% if headerLevel == 0 %}
77+
<!-- Split up the node based on closing angle brackets and get the first one. -->
78+
{% assign firstChunk = node | split: '>' | first %}
79+
80+
<!-- If the first chunk does NOT contain a '<', that means we've broken another HTML tag that starts with 'h' -->
81+
{% unless firstChunk contains '<' %}
82+
{% capture node %}<h{{ node }}{% endcapture %}
83+
{% endunless %}
84+
85+
{% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %}
86+
{% continue %}
87+
{% endif %}
88+
89+
{% capture _closingTag %}</h{{ headerLevel }}>{% endcapture %}
90+
{% assign _workspace = node | split: _closingTag %}
91+
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
92+
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
93+
{% assign escaped_header = header | strip_html | strip %}
94+
95+
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
96+
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
97+
{% assign _html_class = _classWorkspace[0] %}
98+
99+
{% if _html_class contains "no_anchor" %}
100+
{% assign skip_anchor = true %}
101+
{% else %}
102+
{% assign skip_anchor = false %}
103+
{% endif %}
104+
105+
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
106+
{% if _idWorkspace[1] %}
107+
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
108+
{% assign html_id = _idWorkspace[0] %}
109+
{% assign h_attrs = headerAttrs %}
110+
{% elsif include.generateId %}
111+
<!-- If the header did not have an id we create one. -->
112+
{% assign html_id = escaped_header | slugify %}
113+
{% if html_id == "" %}
114+
{% assign html_id = false %}
115+
{% endif %}
116+
<!-- Append the generated id to other potential header attributes. -->
117+
{% capture h_attrs %}{{ headerAttrs }} id="%html_id%"{% endcapture %}
118+
{% endif %}
119+
120+
<!-- Build the anchor to inject for our heading -->
121+
{% capture anchor %}{% endcapture %}
122+
123+
{% if skip_anchor == false and html_id and headerLevel >= minHeader and headerLevel <= maxHeader %}
124+
{% if h_attrs %}
125+
{% capture _hAttrToStrip %}{{ _hAttrToStrip | split: '>' | first }} {{ h_attrs | strip | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}>{% endcapture %}
126+
{% endif %}
127+
128+
{% capture anchor %}href="#{{ html_id }}"{% endcapture %}
129+
130+
{% if include.anchorClass %}
131+
{% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %}
132+
{% endif %}
133+
134+
{% if include.anchorTitle %}
135+
{% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', escaped_header }}"{% endcapture %}
136+
{% endif %}
137+
138+
{% if include.anchorAttrs %}
139+
{% capture anchor %}{{ anchor }} {{ include.anchorAttrs | replace: '%heading%', escaped_header | replace: '%html_id%', html_id }}{% endcapture %}
140+
{% endif %}
141+
142+
{% capture anchor %}<a {{ anchor }}>{{ include.anchorBody | replace: '%heading%', escaped_header | default: '' }}</a>{% endcapture %}
143+
144+
<!-- In order to prevent adding extra space after a heading, we'll let the 'anchor' value contain it -->
145+
{% if beforeHeading %}
146+
{% capture anchor %}{{ anchor }} {% endcapture %}
147+
{% else %}
148+
{% capture anchor %} {{ anchor }}{% endcapture %}
149+
{% endif %}
150+
{% endif %}
151+
152+
{% capture new_heading %}
153+
<h{{ _hAttrToStrip }}
154+
{{ include.bodyPrefix }}
155+
{% if beforeHeading %}
156+
{{ anchor }}{{ header }}
157+
{% else %}
158+
{{ header }}{{ anchor }}
159+
{% endif %}
160+
{{ include.bodySuffix }}
161+
</h{{ headerLevel }}>
162+
{% endcapture %}
163+
164+
<!--
165+
If we have content after the `</hX>` tag, then we'll want to append that here so we don't lost any content.
166+
-->
167+
{% assign chunkCount = _workspace | size %}
168+
{% if chunkCount > 1 %}
169+
{% capture new_heading %}{{ new_heading }}{{ _workspace | last }}{% endcapture %}
170+
{% endif %}
171+
172+
{% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %}
173+
{% endfor %}
174+
{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h2 id="project_tagline">{{ site.description | default: site.github.project_tagl
5858
<!-- MAIN CONTENT -->
5959
<div id="main_content_wrap" class="outer">
6060
<section id="main_content" class="inner">
61-
{{ content }}
61+
{% include anchor_headings.html html=content anchorBody="#" %}
6262
</section>
6363
</div>
6464

favicon.ico

39 KB
Binary file not shown.

gettingstarted/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ FreeCAD depends on many other open source projects to provide the basic foundati
3535
3. Set up `pre-commit` (our automatic code-formatter and checker):
3636

3737

38-
- Install `pre-commit`:
39-
- `apt install pre-commit` (Debian/Ubuntu)
40-
- `dnf install pre-commit` (Fedora)
41-
- `pip install pre-commit`
42-
- `cd FreeCAD-src`
43-
- `pre-commit install`
38+
- Install `pre-commit` (either using your system package manager or pip):
39+
- Debian/Ubuntu: `apt install pre-commit`
40+
- Fedora: `dnf install pre-commit` (Fedora)
41+
- Other (pip in PATH): `pip install pre-commit`
42+
- Other (pip not in PATH): `python -m pip install pre-commit`
43+
- On a command line, change into your FreeCAD clone, e.g. `cd FreeCAD-src`
44+
- Run `pre-commit install` (or `python -m pre-commit install`, depending on your PATH)
45+
46+
4447

4548
4. We **strongly** recommend doing an out-of-source build, that is, build FreeCAD and put all generated files in a separate directory. Otherwise, the build files will be spread all over the source code and it will be much harder to sort out one from the other. A build directory can be created outside the FreeCAD source folder or inside:
4649

maintainersguide/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ layout: default
66

77
Guidelines for Maintainers regarding code review and merge procedures. Git can be [configured to make checking out and reviewing PRs easier](./git.md).
88

9+
## The Current Team of Maintainers
10+
11+
- Adrián Insaurralde Avalos: release manager, PR triage
12+
- Yorik van Havre: Arch/BIM, Spreadsheet
13+
- Brad "sliptonic" Collette: Path
14+
- Werner Mayer: everything
15+
- WandererFan: TechDraw
16+
- abdullahtahiriyo: Sketcher
17+
- Bernd Hahnebach: FEM
18+
- Roy-043: Draft
19+
- OpenBrain: CI management
20+
- Chris Hennes: addon manager, translations, topological naming
921

1022
## The Role of a Maintainer
1123

roadmap/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ layout: default
66

77
The roadmap provides broad objectives for the direction of FreeCAD development.
88

9-
# Development Roadmap 1.0
9+
# Development Roadmap
1010

1111
This document describes several high-level objectives for the FreeCAD project. Rather than being a laundry list of development tasks, it focuses on a small set of strategic initiatives that, if achieved, will move FreeCAD closer to an ideal future state.
1212

13-
You can read more about the [rationale for having a roadmad](rationale.md)
13+
You can read more about the [rationale for having a roadmap](rationale.md).
1414

1515
This roadmap outlines broad strategic objectives. Code contributions from developers will always be evaluated on their merits but are more likely to receive timely attention and be successfully merged if they are consistent with the stated objectives of this roadmap.
1616

17+
# The "Next" Release
18+
19+
These objectives described here are very broad. Some of them are very ambitious and will take a long time to achieve. Others will never be fully achieved or 'done'. For that reason, it's helpful to pick a specific set of goals to focus on for the next release. [This page](next.md) broadly describes the major goals for the next release.
20+
1721
## Objective: Model stability
1822

1923
Robust, stable models are a necessary precursor to widespread adoption of FreeCAD. Some types of breakage are the unavoidable result of poor design practices by the user but FreeCAD must commit itself to reducing or eliminating as many causes of breakage as possible. Focus areas include:

0 commit comments

Comments
 (0)