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

Integrate markdown-magic to auto-generate TOC and contributors #1159

Closed
wants to merge 31 commits into from

Conversation

fb55
Copy link
Member

@fb55 fb55 commented Mar 11, 2018

Right now both of these need to be manually updated.

inikulin and others added 20 commits March 9, 2018 16:42
Update test phrasing according to recent changes in parsing logic.
Limit responsibility of "pre-publish" script to simply validate the
project's `History.md` file (by verifying an entry for the current
release). Define a separate script for history generation. Separating
the workflow in this way allows for manual modification of the release
notes.
Simply expose an option named `xml` that enables XML parsing via
htmlparser2 with the ability to specify additional options for that
parser.
This flag is used to control parsing behavior internally, but it is not
intended for use by consumers. Prefix the name with an underscore in
order to discourage users from relying on it.
Incorporate recent feedback from consumers who have experimented with
the version 1.0 release candidate.
Breaking change: Invalid selectors now throw Errors, not SyntaxErrors.
Since enabling the `withDomLvl1` parsing option, nodes cannot be created
with an object literal. Create new text nodes using the `evaluate`
function to ensure they expose the correct attributes.
… case to the switch in the prop function, which wraps a clone of in a container element, and sets to that container's HTML (#945)
This includes code coverage reports as generated by the command `make
test-cov`.
@fb55
Copy link
Member Author

fb55 commented Mar 25, 2018

@jugglinmike Any issues with this? It helps with keeping the readme up to date and allows us to get more creative with what we include. We could even embed the jsdoc in the readme through https://github.com/bradtaylorsf/markdown-magic-jsdoc, even though that might be a bit heavy.

@fb55 fb55 added the Review label Mar 29, 2018
@jugglinmike
Copy link
Member

My inclination is to go the other way and remove the contributor list. At that point, the readme would be manageable enough to not really need a table of contents. I'm willing to compromise on what is admittedly a more subjective issue, but I'm not comfortable incorporating a process that is not trivially repeatable. Our release cadence has slowed down to the point where I expect to forget any manual steps, so I'd much prefer to nail those details down in the Makefile.

Also, note that the make target doesn't seem to function as intended:

$ make readme
Starting markdown-magic README.md
Error: No files matched
No files matched pattern README.md

It's strange that the binary exits with 0 in this case. But in any event, it looks like we need to use the --path option since our readme file is named Readme.md and not README.md:

$ ./node_modules/.bin/md-magic --help

  Usage: md-magic [options]

  Options:

    -V, --version        output the version number
    -p, --path [path]    Define path to markdown (single path or glob). Default README.md (default: README.md)
    -i, --ignore [path]  (Optional) Define path to ignore (default: ./markdown.config.js)
    -c, --config [path]  (Optional) Define config file path. If you have custom transforms or a callback you will want to specify this option (default: null)
    -h, --help           output usage information

When I run this locally, though, the utility creates a contributor list which differs significantly than what is currently defined on the branch. Because Ihad to modify the GNU Make target, it's possible that my invocation differs from yours in some other significant way. Could you verify the effect of the following command?

./node_modules/.bin/md-magic --path Readme.md

@fb55
Copy link
Member Author

fb55 commented Apr 2, 2018

I've update the command, only difference is that one contributor was added. Sorry for missing this, and weird that you get different output.

My inclination is to go the other way and remove the contributor list.

Totally fine with that. Just wanted to add a way to automatically generate it as it hasn't been updated for quite some time.

We could also leave the section empty and generate it together with the documentation (which also includes the readme). Nothing would be shown in the repo, but we would still mention contributors on the website.

@gajus
Copy link

gajus commented Nov 16, 2019

Please consider https://github.com/gajus/gitdown.

Here is an example project using gitdown: https://github.com/gajus/slonik

@fb55 fb55 changed the base branch from v1.0.0 to master December 12, 2020 08:11
@fb55 fb55 changed the base branch from master to v1.0.0 December 12, 2020 08:12
@fb55 fb55 closed this in f450a68 Dec 20, 2020
@fb55 fb55 deleted the fb55-md-magic branch December 20, 2020 08:54
@fb55
Copy link
Member Author

fb55 commented Dec 20, 2020

I removed the Contributors section from the readme as an alternative to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

7 participants