Comments (5)
I found your issue intersting,I have solution .
do you agree that i contribute in this project ?
thank you .
from web3.
@samyberkane04 yes - please jump in and propose your solution or do a pull request.
from web3.
I think a simple approach to solving this issue is.
Firstly: Add an edit this page link or button in the MDX component
Secondly: Get the file path link using the flattened path returned in the slug.js page
Thirdly: The link ensures it takes the editor to the right edit version of the page on GitHub
Lastly: The editor can edit the page and create a PR
@rufuspollock what do you think?
from web3.
@AceTheCreator sounds good as an approach.
from web3.
Comment from @olayway in the PR #159 copied here:
Changes
- 'Edit this page' button added at the bottom of the guide, claims, and concepts pages
Notes
I've arbitrarily added this option only for /guide, /claims/[...] and /concepts/[...] pages since it didn't make much sense to me to add it for non-wiki-like pages (e.g. notes from our podcasts which I thought should not be subject to external user's changes). However, not adding this button on a particular page doesn't really prevent a user from finding it directly to GitHub and committing changes.
Content protection
There is no way to create protection rules on GitHub for selected paths or files within a project = protection rules can only be set on a whole branch (but I may be wrong). Thus there seem to be a few options we could consider (I'm no expert in this subject so please take it with a grain of salt):
Solution A
Making the main
branch protected and allowing commits only through PRs that require reviews from someone from Life Itself.
Solution B
Making the main
branch protected and creating a separate non-protected branch, e.g. contributions
that anyone could commit to.
- potential issues: how to make this non-protected branch (
contributions
) up-to-date withmain
branch, so that the content the user sees on the webpage (sourced frommain
) and intends to edit is the same he will see when clicking on 'Edit this page' (redirects to the page file oncontributions
branch) are in constant alignment. - possible solution: GitHub Action on push that would automatically pull from
main
(after someone from Life Itself has pushed some changes) tocontributions
. However, there may occur some conflicting changes in this case in which such pull would fail, and further action would be required.
Solution C (The best option in my opinion)
Creating an unprotected branch e.g. contributions
and creating a submodule of web3 repo, that would point to itself but to its unprotected branch (contributions
). So, we would have:
contributions
- unprotected branch with:- directories with pages we want others to easily commit to
main
- protected branch with:- submodule pointing to the
contributions
branch of the repo
- submodule pointing to the
Flow:
- Some user makes changes to any file and commits them to the
contributions
branch:
cd web3/submodule-with-unprotected-content
# modify files
git add .
git commit -m "modify submodule-with-unprotected-content files"
- In order to make these changes reflected on the
main
branch we would do sth like this:
# on web3 repo main branch
git add submodule-with-unprotected-content
git commit -m "record submodule-with-unprotected-content new SHA1"
git push
Reference: https://stackoverflow.com/a/35307501
from web3.
Related Issues (20)
- Extract video segment on Gold Fever from Sebastiao Salgado documentary
- Build error on sec-remarks related to YOUTUBE_REGEX HOT 1
- [PAUSED] Adding frontmatter to all notes pages HOT 2
- Fix images which are not showing HOT 2
- Web3 and Crypto Claims Database HOT 2
- [epic] Guide v2 providing an intro and overview of claims HOT 3
- [epic] Transcribing episodes / interviews
- Standard structure for claims
- Convert editor guide into markdown and publish on site HOT 1
- Proof-edit Samer Hassan episode transcription
- Proof-edit Jeff Emmett episode transcription HOT 1
- Reflections on Crypto Post FTX collapse with Stephen Diehl HOT 1
- Merging KlimaDAO pages HOT 3
- Page layout for site HOT 5
- Mobile sidebar HOT 3
- Web3 Guide Launch HOT 8
- Interview on Future Squared Podcast with Steve Glaveski HOT 4
- Broken images on some pages (links to root directory rather than assets) HOT 5
- Upgrade site to use flowershow
- Add Read the Guide CTA to hero
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3.