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

Support markdown includes in package readme files #210

Closed
kzu opened this issue Aug 8, 2022 · 0 comments
Closed

Support markdown includes in package readme files #210

kzu opened this issue Aug 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Member

kzu commented Aug 8, 2022

Basically implement my resolve file includes GH action as a built-in feature of nugetizer.

This would allow a package readme to simply reference other files within a repository, like:

<!-- include ../../readme.md#content -->
<!-- include ../../docs/footer.md -->

Where the main project readme could contain a bunch of project-level info, contrib, badges, etc., which you can skip by marking a specific area as the #content anchor:

# My Project
// bunch of badges
// building/contributing, etc.

<~-- #content -->
# Usage
// now the real stuff we want in a package readme

The footer.md could contain project sponsors and the like, and also be reused across multiple packages.

@kzu kzu added the enhancement New feature or request label Aug 8, 2022
kzu added a commit that referenced this issue Aug 11, 2022
Allows a package readme to simply reference other files (via relative path and optional
fragment specifier), like:

```
<!-- include ../../readme.md#content -->
<!-- include ../../docs/footer.md -->
```

Where the main project readme could contain a bunch of project-level info,
contrib, badges, etc., which you can skip by marking a specific area as t
he #content anchor:

```
# My Project
// bunch of badges
// building/contributing, etc.

<~-- #content -->
# Usage
// now the real stuff we want in a package readme
```

The `footer.md` could contain project sponsors and the like, and also be
reused across multiple packages.

The includes must be relative (to the including file) file paths, and the fragmnet
specifier is optional. If the fragment specifier does not have an "end" anchor in
the included file, the file is included from the anchor definition until EOF.

The includes are only resolved when the actual .nupkg is created, and via a temp
file, to avoid affecting the build's incrementality (which doesn't apply to the .nupkg
itself either).

Fixes #210
kzu added a commit that referenced this issue Aug 11, 2022
Allows a package readme to simply reference other files (via relative path and optional
fragment specifier), like:

```
<!-- include ../../readme.md#content -->
<!-- include ../../docs/footer.md -->
```

Where the main project readme could contain a bunch of project-level info,
contrib, badges, etc., which you can skip by marking a specific area as t
he #content anchor:

```
# My Project
// bunch of badges
// building/contributing, etc.

<~-- #content -->
# Usage
// now the real stuff we want in a package readme
```

The `footer.md` could contain project sponsors and the like, and also be
reused across multiple packages.

The includes must be relative (to the including file) file paths, and the fragmnet
specifier is optional. If the fragment specifier does not have an "end" anchor in
the included file, the file is included from the anchor definition until EOF.

The includes are only resolved when the actual .nupkg is created, and via a temp
file, to avoid affecting the build's incrementality (which doesn't apply to the .nupkg
itself either).

Fixes #210
@kzu kzu closed this as completed in 71cac2e Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant