Skip to content

refactor: Ensure to use change image tag instead hardcoded image#475

Merged
jayair merged 1 commit intoanomalyco:sstfrom
preshetin:image-tag
Sep 18, 2020
Merged

refactor: Ensure to use change image tag instead hardcoded image#475
jayair merged 1 commit intoanomalyco:sstfrom
preshetin:image-tag

Conversation

@preshetin
Copy link
Copy Markdown
Contributor

@preshetin preshetin commented Apr 29, 2020

Hey there. While making edits some time ago I noticed that the CHANGE utility image is hardcoded. To improve the author experience, I refactored it to use Jekyl's plugin system.

To find and replace throughout all files in _chapters folder , you may want to run this command inside project dir:

find _chapters \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i '' 's/<img class="code-marker" src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%5C%2Fassets%5C%2Fs%5C.png" \/>/\{%change%\}/g'

I didn't include the changes made by this command to make the code review simpler. However, feel free to run it yourself.

Hope this would add some value to this awesome guide.

@jayair
Copy link
Copy Markdown
Contributor

jayair commented May 3, 2020

Oh this is pretty cool. Thank you! I didn't know you could do that. Can we use it as {% change %} instead of {%change%}?

@preshetin
Copy link
Copy Markdown
Contributor Author

Yes, absolutely.

Also, if you would want to have additional space between this image and first paragraph word (eg {% change %} Paragraph start, instead of {% change %}Paragraph start), then some CSS adjustment would be needed (I can do it).

Let me know how you would like me to adjust this PR

@jayair
Copy link
Copy Markdown
Contributor

jayair commented May 17, 2020

@preshetin Oh that would be really cool! If you can handle the space that would be much better.

@jayair jayair changed the base branch from master to sst September 18, 2020 17:30
@jayair jayair merged commit 01f349b into anomalyco:sst Sep 18, 2020
@jayair
Copy link
Copy Markdown
Contributor

jayair commented Sep 18, 2020

Going to try this in a dev branch!

@jayair
Copy link
Copy Markdown
Contributor

jayair commented Sep 18, 2020

Works like a charm. Thanks @preshetin!

jayair added a commit that referenced this pull request Oct 8, 2020
* Adding cdk chapter and updating IaC chapter

* Adding chapter to using Serverless Framework with CDK

* refactor: Ensure to use change image tag instead hardcoded image (#475)

* Moving to Jekyll tag instead of image

* Switching all chapters to Jekyll change tag

* Adding chapter on creating SST app

* Working on DynamoDB chapter

* Adding chapter on connecting sls and sst

* Adding chapters on Cognito

* Change best practice chapters to use SST

* Finishing sst code snippets

* Working on best practices chapter

* Fixing best parctices chapters

* Change first section to use SST

* Fixing old links

* Editing chapters

* Add comments for CDK code

* Editing main guide

* Editing best practices

* Updating chapter commnets

* Updating changelog

Co-authored-by: Petr Reshetin <[email protected]>
Co-authored-by: Frank <[email protected]>
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.

2 participants