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

Add condition to disable edit post on md file #1143

Merged
merged 4 commits into from
Apr 1, 2023
Merged

Add condition to disable edit post on md file #1143

merged 4 commits into from
Apr 1, 2023

Conversation

douglastofoli
Copy link
Contributor

What does this PR change? What problem does it solve?

Hello @adityatelange

I made a small condition to hide the hyperlink "Suggest changes" on some specifics pages
I didn't find on documentation this option, if already exist then disregard this PR

Basically I want to create an About page without "Suggest changes"

Behaviour:

(config) disable true
(about.md) disable true

hide editPost

(config) disable false
(about.md) disable true

hide editPost

(config) disable true
(about.md) disable false

hide editPost

---
title: "About Me"
date: 2023-01-23T17:57:02-03:00
draft: false
comments: false

editPost:
  disable: true
---

Was the change discussed in an issue or in the Discussions before?
No

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

@sonarcloud
Copy link

sonarcloud bot commented Jan 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@douglastofoli douglastofoli changed the title add condition to disable edit post on md file Add condition to disable edit post on md file Jan 30, 2023
douglastofoli and others added 2 commits March 15, 2023 00:16
@sonarcloud
Copy link

sonarcloud bot commented Apr 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit 031e2ba into adityatelange:master Apr 1, 2023
jdxgfty pushed a commit to jdxgfty/hugo-PaperMod that referenced this pull request Nov 3, 2024
editPost:
    disabled: true

---------

Co-authored-by: Aditya Telange <[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