Fix contributors #24

Open
xrdawson wants to merge 2 commits from fix_contributors into main
xrdawson commented 2023-07-20 02:54:57 +00:00 (Migrated from extrastatic.dev)

This enables contributor badges.

contributors

To enable contributors, use an override, probably by adding to src/Postroll.svelte.

<script>
  import Contributors from '$svekyll/Contributors.svelte';  
</script>

<Contributors/>

Then, enable contributor badges in the _config.yml like this:

contributors:
  enabled: true
  message: "These people reviewed this post, thanks!"
  show_gravatars: true
  list_names: true

The items are wrapped in classes which you can override in your user.css

  .svekyll-contributor-names {
    @apply text-xs text-gray-400;
  }
  .svekyll-contributor-offset {
    @apply -inset-x-4;
    position: relative;
  }
  .svekyll-contributor {
    @apply w-12 h-12 rounded-full relative inline-block;
  }

  .svekyll-contributor-list-names {
    @appply italic;
  }

That will then scan your git repository for authors, md5 their email address to obscure them, and place gravatars or their names into your blog.

TODO:

  • Actually pull from git. Right now this relies on CONTRIBUTORS as an env var (like this: CONTRIBUTORS='[ "Chris Dawson:xrdawson@gmail.com", "Bob Johnson:bob@bob.com", "Fooey Foo:foo@foo.com" ]' node $(which yarn) build
  • Actually create a unique CONTRIBUTORS env var for each post, don't use the same one for every post.
  • Fix alignment of gravatars. The third one in the image does not have the correct offset.
This enables contributor badges. ![contributors](/uploads/bcf4f1577b7f151a795a181391156c7d/contributors.png) To enable contributors, use an override, probably by adding to `src/Postroll.svelte`. ``` <script> import Contributors from '$svekyll/Contributors.svelte'; </script> <Contributors/> ``` Then, enable contributor badges in the `_config.yml` like this: ``` contributors: enabled: true message: "These people reviewed this post, thanks!" show_gravatars: true list_names: true ``` The items are wrapped in classes which you can override in your user.css ``` .svekyll-contributor-names { @apply text-xs text-gray-400; } .svekyll-contributor-offset { @apply -inset-x-4; position: relative; } .svekyll-contributor { @apply w-12 h-12 rounded-full relative inline-block; } .svekyll-contributor-list-names { @appply italic; } ``` That will then scan your git repository for authors, md5 their email address to obscure them, and place gravatars or their names into your blog. TODO: - [ ] Actually pull from git. Right now this relies on CONTRIBUTORS as an env var (like this: `CONTRIBUTORS='[ "Chris Dawson:xrdawson@gmail.com", "Bob Johnson:bob@bob.com", "Fooey Foo:foo@foo.com" ]' node $(which yarn) build` - [ ] Actually create a unique CONTRIBUTORS env var for each post, don't use the same one for every post. - [ ] Fix alignment of gravatars. The third one in the image does not have the correct offset.
xrdawson commented 2023-07-20 02:55:30 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
xrdawson commented 2023-07-20 02:56:25 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
xrdawson commented 2023-07-20 02:58:59 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
xrdawson commented 2023-07-20 03:02:40 +00:00 (Migrated from extrastatic.dev)

added 1 commit

  • 59169ef9 - Update overridable class names

Compare with previous version

added 1 commit <ul><li>59169ef9 - Update overridable class names</li></ul> [Compare with previous version](/svekyll/svekyll-cli/-/merge_requests/2/diffs?diff_id=3001&start_sha=8c3818385cdbe5a663aa7efb271ae42448eedaee)
xrdawson commented 2023-07-20 03:09:53 +00:00 (Migrated from extrastatic.dev)

changed the description

changed the description
This pull request has changes conflicting with the target branch.
  • svekyll/Contributors.svelte
  • svekyll/cli.js
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix_contributors:fix_contributors
git switch fix_contributors

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix_contributors
git switch fix_contributors
git rebase main
git switch main
git merge --ff-only fix_contributors
git switch fix_contributors
git rebase main
git switch main
git merge --no-ff fix_contributors
git switch main
git merge --squash fix_contributors
git switch main
git merge --ff-only fix_contributors
git switch main
git merge fix_contributors
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
svekyll/svekyll-cli!24
No description provided.