Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate TOC without custom jekyll plugin #25838

Closed
wants to merge 9 commits into from
Closed

Conversation

m5o
Copy link
Contributor

@m5o m5o commented Mar 13, 2018

  • use allejo/jekyll-toc for toc generation
  • remove custom jekyll plugin toshimaru/jekyll-toc
  • use h5 and h6 headlines inside callouts
    • h5 and h6 by default are excluded by toc generation

I've checked generation of every site, it works like a charm 👌

This is the final 🏁 PR wich removes custom plugins from
bootstrap docs and enable first-class support for github-pages 🙌

🔗 #25784
🔗 #25319
🔗 #25320

Hope you like it. 🖖

/cc @allejo

@XhmikosR
Copy link
Member

Like I have said numerous times, I'd rather not do this. Using GitHub pages is useless in our case.

@m5o
Copy link
Contributor Author

m5o commented Mar 13, 2018

This is your opinion, with a project with 60k forks and a maintainer working at github this responsibility may be different. The goal should be to make the setup easy for each contributor, no matter if html beginner, dev expert or theme designer. github pages helps to visualize quick results with a easy setup. This is a request and was just easy to achieve, I've wanted to point this out. ✌️

@XhmikosR
Copy link
Member

Again, it's not my point of view; it's how we use GitHub pages. We have the old docs there too, which aren't present in the branch here.

Anyway, I give up on this. To me, all this is futile. Nor have you pasted any numbers from all these changes, positive or negative.

Off to @mdo.

@XhmikosR XhmikosR removed their request for review March 13, 2018 15:47
@m5o
Copy link
Contributor Author

m5o commented Mar 15, 2018

📊 Jekyll's build-in Liquid profiler generates:

Filename                                                  | Count |    Bytes |  Time
_includes/toc.html                                        |    53 |   50.29K | 0.384

Sadly, custom plugins are not detailed listed. I could only compare the total build time:
~5.153 seconds (jekyll-doc branch) vs. ~5.427 seconds (v4-dev)

jekyll-doc branch – bundle exec jekyll build --profile
$ # jekyll-doc branch
Filename                                                  | Count |    Bytes |  Time
----------------------------------------------------------+-------+----------+------
_layouts/docs.html                                        |    66 | 2819.39K | 1.705
_includes/header.html                                     |    68 |  196.31K | 0.503
_includes/docs-sidebar.html                               |    66 |  548.48K | 0.420
_includes/toc.html                                        |    53 |   50.29K | 0.384
_includes/social.html                                     |    68 |   79.21K | 0.259
docs/4.0/getting-started/accessibility.md                 |     1 |    4.37K | 0.175
_includes/docs-navbar.html                                |    68 |  441.27K | 0.173
docs/4.0/browser-bugs.md                                  |     1 |   27.34K | 0.079
sitemap.xml                                               |     1 |    7.99K | 0.071
_includes/callout.html                                    |    25 |   21.11K | 0.062
_includes/scripts.html                                    |    68 |   55.47K | 0.048
docs/4.0/components/forms.md                              |     1 |  171.26K | 0.042
docs/4.0/components/card.md                               |     1 |  105.54K | 0.031
docs/4.0/content/tables.md                                |     1 |   65.76K | 0.023
docs/4.0/components/navs.md                               |     1 |   83.06K | 0.022
docs/4.0/components/dropdowns.md                          |     1 |   70.68K | 0.020
docs/4.0/layout/grid.md                                   |     1 |   60.82K | 0.018
_includes/favicons.html                                   |    68 |   41.30K | 0.018
_includes/icons/bootstrap.svg                             |    68 |   49.34K | 0.017
_includes/icons/github.svg                                |    68 |   63.29K | 0.017
_includes/bugify.html                                     |     1 |   11.51K | 0.017
_includes/icons/slack.svg                                 |    68 |   79.62K | 0.017
_includes/icons/twitter.svg                               |    68 |   46.35K | 0.016
_includes/icons/menu.svg                                  |    66 |   15.92K | 0.016
docs/4.0/components/navbar.md                             |     1 |   66.70K | 0.014
docs/4.0/getting-started/theming.md                       |     1 |   34.03K | 0.013
docs/4.0/components/list-group.md                         |     1 |   49.14K | 0.013
docs/4.0/components/modal.md                              |     1 |   53.33K | 0.012
docs/4.0/content/typography.md                            |     1 |   24.39K | 0.012
_includes/callout-warning-color-assistive-technologies.md |     7 |    3.86K | 0.011
_layouts/default.html                                     |     1 |   21.19K | 0.011
docs/4.0/components/input-group.md                        |     1 |   51.56K | 0.011
docs/4.0/content/reboot.md                                |     1 |   13.65K | 0.011
_layouts/home.html                                        |     1 |   17.47K | 0.011
docs/4.0/utilities/flex.md                                |     1 |   36.10K | 0.010
_includes/callout-danger-async-methods.md                 |     6 |    3.19K | 0.010
docs/4.0/getting-started/download.md                      |     1 |    6.12K | 0.010
docs/4.0/components/tooltips.md                           |     1 |   22.05K | 0.010
docs/4.0/components/popovers.md                           |     1 |   22.48K | 0.009
docs/4.0/components/buttons.md                            |     1 |   21.24K | 0.008
docs/4.0/utilities/colors.md                              |     1 |   11.76K | 0.008
docs/4.0/components/scrollspy.md                          |     1 |   29.33K | 0.008
docs/4.0/layout/media-object.md                           |     1 |   19.67K | 0.008
docs/4.0/layout/overview.md                               |     1 |   15.77K | 0.008
docs/4.0/components/button-group.md                       |     1 |   21.73K | 0.007
docs/4.0/components/alerts.md                             |     1 |   15.79K | 0.006
docs/4.0/components/carousel.md                           |     1 |   28.08K | 0.006
docs/4.0/components/collapse.md                           |     1 |   25.31K | 0.005
docs/4.0/components/pagination.md                         |     1 |   23.07K | 0.005
docs/4.0/getting-started/javascript.md                    |     1 |   11.26K | 0.005

 
                    done in 5.153 seconds.
v4-dev branch – bundle exec jekyll build --profile
$ # v4-dev branch
Filename                                                  | Count |    Bytes |  Time
----------------------------------------------------------+-------+----------+------
_layouts/docs.html                                        |    66 | 2823.36K | 1.713
_includes/header.html                                     |    68 |  196.31K | 0.513
_includes/docs-sidebar.html                               |    66 |  551.06K | 0.416
_includes/social.html                                     |    68 |   79.21K | 0.279
docs/4.0/getting-started/accessibility.md                 |     1 |    4.37K | 0.266
_includes/example.html                                    |    39 |  761.08K | 0.222
_includes/docs-navbar.html                                |    68 |  441.27K | 0.183
docs/4.0/browser-bugs.md                                  |     1 |   27.34K | 0.083
_includes/callout.html                                    |    25 |   21.11K | 0.068
sitemap.xml                                               |     1 |    7.99K | 0.065
docs/4.0/components/forms.md                              |     1 |  172.66K | 0.055
_includes/scripts.html                                    |    68 |   55.47K | 0.050
docs/4.0/components/card.md                               |     1 |  106.00K | 0.032
docs/4.0/content/tables.md                                |     1 |   65.85K | 0.027
docs/4.0/components/navs.md                               |     1 |   83.16K | 0.025
_includes/icons/github.svg                                |    68 |   63.29K | 0.023
docs/4.0/components/list-group.md                         |     1 |   49.20K | 0.022
docs/4.0/layout/grid.md                                   |     1 |   60.98K | 0.021
docs/4.0/components/dropdowns.md                          |     1 |   70.77K | 0.020
docs/4.0/components/navbar.md                             |     1 |   66.86K | 0.019
_layouts/home.html                                        |     1 |   17.47K | 0.019
_includes/bugify.html                                     |     1 |   11.51K | 0.019
_includes/icons/bootstrap.svg                             |    68 |   49.34K | 0.017
_includes/favicons.html                                   |    68 |   41.30K | 0.017
_includes/icons/twitter.svg                               |    68 |   46.35K | 0.017
_includes/icons/menu.svg                                  |    66 |   15.92K | 0.016
_includes/icons/slack.svg                                 |    68 |   79.62K | 0.016
docs/4.0/components/input-group.md                        |     1 |   51.63K | 0.014
_includes/callout-warning-color-assistive-technologies.md |     7 |    3.86K | 0.013
docs/4.0/components/buttons.md                            |     1 |   21.32K | 0.013
docs/4.0/getting-started/theming.md                       |     1 |   34.03K | 0.013
docs/4.0/content/typography.md                            |     1 |   24.46K | 0.012
docs/4.0/components/carousel.md                           |     1 |   28.82K | 0.012
docs/4.0/components/modal.md                              |     1 |   53.34K | 0.012
_includes/callout-danger-async-methods.md                 |     6 |    3.19K | 0.012
docs/4.0/layout/overview.md                               |     1 |   15.77K | 0.011
docs/4.0/content/reboot.md                                |     1 |   13.65K | 0.010
_layouts/default.html                                     |     1 |   21.19K | 0.010
docs/4.0/components/badge.md                              |     1 |   11.60K | 0.010
docs/4.0/components/popovers.md                           |     1 |   22.50K | 0.010
docs/4.0/utilities/flex.md                                |     1 |   36.78K | 0.009
docs/4.0/layout/media-object.md                           |     1 |   19.77K | 0.009
docs/4.0/components/tooltips.md                           |     1 |   22.06K | 0.008
docs/4.0/components/scrollspy.md                          |     1 |   29.33K | 0.008
docs/4.0/getting-started/download.md                      |     1 |    6.12K | 0.008
docs/4.0/utilities/colors.md                              |     1 |   11.79K | 0.008
docs/4.0/components/alerts.md                             |     1 |   15.81K | 0.008
docs/4.0/components/button-group.md                       |     1 |   21.76K | 0.007
docs/4.0/components/pagination.md                         |     1 |   23.12K | 0.007
docs/4.0/components/collapse.md                           |     1 |   25.33K | 0.007

 
                    done in 5.427 seconds.

@m5o
Copy link
Contributor Author

m5o commented Mar 17, 2018

@XhmikosR Would you please remove the on-hold Label from the PR 🙇

Sorry I'didn't discover the --profile option earlier. I've found this later by studying the docs.

@m5o m5o force-pushed the jekyll-toc branch 2 times, most recently from 3eb4c81 to d897122 Compare April 10, 2018 09:36
@m5o
Copy link
Contributor Author

m5o commented May 25, 2018

Hey @mdo 👋 Are you interested in this change? Just asking, if it's worth the work to keep it up-to-date with v4-dev branch.

@m5o m5o force-pushed the jekyll-toc branch 2 times, most recently from 9c7e907 to fe68d72 Compare July 12, 2018 17:41
@XhmikosR
Copy link
Member

@mdo: what do you want to do with this one?

@mdo
Copy link
Member

mdo commented Oct 21, 2018

@XhmikosR Seems like we should close this one given your ToC work?

@XhmikosR
Copy link
Member

Let's leave this open for now. It'll be moot anyway with Hugo.

@m5o m5o requested a review from a team as a code owner November 14, 2018 08:59
@m5o m5o mentioned this pull request Nov 14, 2018
@m5o m5o force-pushed the jekyll-toc branch 2 times, most recently from 6cabb70 to 03bc0d5 Compare November 17, 2018 10:19
@XhmikosR XhmikosR mentioned this pull request Feb 7, 2019
37 tasks
@XhmikosR
Copy link
Member

XhmikosR commented Feb 7, 2019

Closing this since we are going to switch to Hugo. Thanks for the patch though.

@XhmikosR XhmikosR closed this Feb 7, 2019
@m5o m5o deleted the jekyll-toc branch July 24, 2019 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants