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

Unify markup to Markdown (in this repo) #928

Closed
1 task done
tnir opened this issue Sep 14, 2022 · 2 comments · Fixed by #1069
Closed
1 task done

Unify markup to Markdown (in this repo) #928

tnir opened this issue Sep 14, 2022 · 2 comments · Fixed by #1069
Assignees
Labels
architecture/legacy or broken Legacy and/or broken architecture contributor experience Contributor/Maintainer experience

Comments

@tnir
Copy link
Collaborator

tnir commented Sep 14, 2022

What was the end-user contributor problem that led to this PR?

Middleman supports for multiple template engines as shown in https://middlemanapp.com/basics/templating-language/, and so we had used three engines: HAML, Markdown in addition to ERB for files from the upstream's ronn man pages.

Conversion from Markdown to HAML was done in #230 in 2016 😭 .

What was your diagnosis of the problem?

As HAML allows us to flexibly use Ruby code in their files, these files tend to be complicated. And so line wrapping gets harder to use, which results in problems recently resolved in #926.

As discussed in #829, ronn files in rubygems/rubygems/bundler/..../man are based on Markdown.

While HAML provides helpers to easily avoid duplications, there have been many duplications (see https://github.com/rubygems/bundler-site/milestone/2 for detail).

After completion of https://github.com/rubygems/bundler-site/milestone/2, we will have three types of files in this repository: guides, navigations, blog articles.

guides

While HAML files are dominant, it looks like the existing HAML can be converted to markdown.

$ git ls-files source/guides/*.haml source/localizable/guides/*.haml
source/guides/bundler_plugins.html.haml
source/guides/bundler_setup.html.haml
source/guides/bundler_sharing.html.haml
source/guides/bundler_workflow.html.haml
source/guides/deploying.html.haml
source/guides/faq.html.haml
source/guides/gemfile.html.haml
source/guides/gemfile_ruby.html.haml
source/guides/getting_started.html.haml
source/guides/git.html.haml
source/guides/groups.html.haml
source/guides/rails.html.haml
source/guides/rationale.html.haml
source/guides/rubygems.html.haml
source/guides/rubymotion.html.haml
source/guides/sinatra.html.haml
source/guides/updating_gems.html.haml
source/localizable/guides/bundler_setup.es.html.haml
source/localizable/guides/bundler_sharing.es.html.haml
$ git ls-files source/guides/*.md source/localizable/guides/*.md
source/guides/bundler_2_upgrade.html.md
source/guides/bundler_docker_guide.html.md
source/guides/bundler_in_a_single_file_ruby_script.html.md
source/guides/git_bisect.html.md
source/guides/rubygems_tls_ssl_troubleshooting_guide.html.md
source/localizable/guides/creating_gem.en.html.md
source/localizable/guides/creating_gem.pl.html.md
source/localizable/guides/using_bundler_in_applications.en.html.md
source/localizable/guides/using_bundler_in_applications.pl.html.md

navigations

docs.html.haml has many Ruby code snippets but they can be replaced with a new Rake task. whats_new.html.haml has no Ruby code so that it would be easily converted to markdown.

source/v2.3/docs.html.haml
source/v2.3/whats_new.html.haml

blog articles

All articles are rewritten in Markdown. No sense to convert them to HAML.

What will be your fix for the problem?

All files would be in Markdown than a mixture of HAML and Markdown.

TODO

Why will you choose this fix out of the possible options?

Not sure if HAML is suitable for such a static site.

@tnir tnir self-assigned this Sep 14, 2022
@tnir tnir added the architecture/legacy or broken Legacy and/or broken architecture label Sep 14, 2022
@tnir tnir added this to the Architecture overhaul milestone Sep 14, 2022
@tnir tnir closed this as completed in #1069 Jan 7, 2023
@tnir
Copy link
Collaborator Author

tnir commented Jan 7, 2023

After many fixes and #1069, 🎉

$ find source -path "*/guides*haml*" | wc -l
0

@tnir tnir added the contributor experience Contributor/Maintainer experience label Jan 7, 2023
@simi
Copy link
Member

simi commented Jan 8, 2023

Good job @tnir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture/legacy or broken Legacy and/or broken architecture contributor experience Contributor/Maintainer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants