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

fix adr/adr-log#28 #29

Merged
merged 1 commit into from
Nov 15, 2019
Merged

fix adr/adr-log#28 #29

merged 1 commit into from
Nov 15, 2019

Conversation

Fetz
Copy link

@Fetz Fetz commented Nov 15, 2019

Changelog

@koppor koppor merged commit 0f9605a into adr:master Nov 15, 2019
@koppor
Copy link
Member

koppor commented Nov 15, 2019

Thank you so much for taking quick action! I'll try to release a new version soon!

Another idea for improvement is that the tool works without toc markings. It can deduct from the structure where the old TOC resides (begins with an item linking to an ADR and ends with a link-to-ADR item followed by a newine)

@chrisgilmerproj
Copy link

I think that this broke something for me. My new links now show up as like:

[ADR-0014](../adr0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

I am expecting a slash between adr and 0014. It only appeared for me recently so I may have to pin to 2.1.1. Would you like me to open an issue on this?

@Fetz
Copy link
Author

Fetz commented Nov 19, 2019

Hey @chrisgilmerproj sorry about that. I will try to fix it today. Can you share the expected markup and if is on Windows or Unix (Marcos, Linux...)

@koppor
Copy link
Member

koppor commented Nov 19, 2019

I think, the expected markup is:

[ADR-0014](0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

@chrisgilmerproj told about a slash, which would lead to

[ADR-0014](../adr/0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

I think, this is not the desired result (why go one directory up?)

@Fetz
Copy link
Author

Fetz commented Nov 19, 2019

running my version of the code (on a mac) with both examples in docs:

  1. input and adr in the same folder:
./cli.js docs/adr/index.md -d docs/adr/

# <!-- adrlog -- Regenerate the content by using "adr-log -i". You can install it via "npm install -g adr-log" -->
# 
# - [ADR-0000](0000-use-markdown-architectural-decision-records.md) - Use Markdown Architectural Decision Records
# - [ADR-0001](0001-extend-markdown-toc.md) - Extend markdown-toc
# - [ADR-0002](0002-use-console-stamp-as-logging-framework.md) - Use console-stamp as logging framework
# - [ADR-0003](0003-use-release-it-and-github-release-from-changelog-as-release-tooling.md) # - Use release-it and github-release-from-changelog for releasing
# - [ADR-0004](0004-filename-as-direct-parameter.md) - Filename as direct parameter
# 
# <!-- adrlogstop -->
  1. input is on a level up compared to the adrs
 ./cli.js docs/index.md -d docs/adr/
# <!-- adrlog -- Regenerate the content by using "adr-log -i". You can install it via "npm install -g adr-log" -->
# 
# - [ADR-0000](adr/0000-use-markdown-architectural-decision-records.md) - Use Markdown Architectural Decision Records
# - [ADR-0001](adr/0001-extend-markdown-toc.md) - Extend markdown-toc
# - [ADR-0002](adr/0002-use-console-stamp-as-logging-framework.md) - Use console-stamp as logging framework
# - [ADR-0003](adr/0003-use-release-it-and-github-release-from-changelog-as-release-tooling.md) - Use release-it and github-release-from-changelog for releasing
# - [ADR-0004](adr/0004-filename-as-direct-parameter.md) - Filename as direct parameter
# 
# <!-- adrlogstop -->

@chrisgilmerproj
Copy link

Hey @chrisgilmerproj sorry about that. I will try to fix it today. Can you share the expected markup and if is on Windows or Unix (Marcos, Linux...)

Yep, it used to be:

[ADR-0014](0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

Now it is:

[ADR-0014](../adr0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

But I expected the change to give me:

[ADR-0014](../adr/0014-aws-roles-and-privileges.md) - AWS Roles and Privileges

Which is still annoying if my ADR is in the same directory as my index.md.

@chrisgilmerproj
Copy link

I am also using this script inside a pre-commit hook which you can see here: https://github.com/trussworks/pre-commit-hooks/blob/master/pre-commit-gen-docs.

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

Successfully merging this pull request may close these issues.

3 participants