-
Notifications
You must be signed in to change notification settings - Fork 91
Support switching between Piwik versions #139
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
Conversation
… version, specify menus as much as possible in markdown
The downside of using "noindex" for older content is that, pages that used to exist but don't exist anymore, will not be indexed by search engines. Maybe it would be useful to have these old pages still indexed?
when there will be 4 or 5 versions, there will still be only two at most that are "actively worked on" (LTS + current), and may have their changelogs updated. as there will be at most the LTS changelog to merge into the "latest" developer changelog, your current simple solution looks good!
The "safest way" seems the best solution for us.
Does it mean these pages should not be copied? or will the website know which pages should always be the same and it doesn't matter whether they are copied or not?
So is the solution to include all our guides' images currently loaded externally into our I'll take a look at the code now |
@@ -153,11 +209,12 @@ function renderGuide(Slim $app, Guide $guide, Category $category) | |||
} | |||
|
|||
if ($fetchContent) { | |||
$markdown = file_get_contents('https://raw.githubusercontent.com/piwik/piwik/master/CHANGELOG.md'); | |||
$markdown = file_get_contents('https://raw.githubusercontent.com/piwik/piwik/3.x-dev/CHANGELOG.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this URL be constructed dynamically reusing the constant LATEST_PIWIK_DOCS_VERSION
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do this once we have develop branch for 2.X etc. It's a bit problematic currently to do this automatically since we will make 3.x
to master
at some point and then we can change it but we basically never know to which version master points so it can be only kind of automated a bit later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
Just to be clear. This means whenever we make a change to an older changelog we need to immediately merge this into |
Yes
We should leave some of the pages under |
It now shows canonical for 2.x if the same content exists for 3.x and I have duplicated all docs into 2.x apart from 3 that remain under /docs |
Awesome PR! made some minor updates in 1517f6a Feel free to rebase + merge 👍 |
@@ -1,235 +0,0 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: We cannot simply remove documents as they are referenced in the menu. We need then to also adjust the linking document which I did just here: 7727baf#diff-42780b1e896c88c6ac34a0e8cab1fcabL2 . Basically I removed it from that submenu and because there is no submenu left I have also removed the title so the category "Migration" won't appear for Piwik 2.x at all.
deployed :) |
FYI: We will also need to be careful when adding links to github. Ideally we start always working on a X.X branch and send the links eg to "2.x-dev" branch or "3.x-dev" branch. This way we make sure the links will still work when eg merging 3.x-dev into master |
fixes #138
ping @mattab
noindex
re the duplicated content.v2
orv3
egPiwik Analytics - Developer Docs - v3
, could also havePiwik 3 Analytics ...
or not mention the version there at all3.x-dev
branch. This means we will always need to merge changes from2.x-dev
(currentlymaster
) into3.x-dev
. While this may work for two Piwik versions only, it can get harder when there are 4 or 5 different Piwik versions. What we could do for this is to fetch individual changelogs for each Piwik version and have either menu items for different Piwik versions or merge them all into one page. First all changes for latest Piwik version, then all changes for older Piwik versions. Be nice to have maybe now everything on one page, once there is Piwik 4 or 5 a menu item for each Piwik version might be better. The thing is we would need to start a new changelog for Piwik 3 to make this happen. Meaning we remove all declared changes for Piwik 2.X in the Piwik 3 branch otherwise there will be likely duplicated content and the changelog would be "wrong" anyway because if we ever don't merge changes for changelog from 2.x into 3.x it would not show all changes obviously. Especially when there is Piwik 4 or 5 it would not be manageable anymore to merge all changes into one changelog file.So far, docs can be put into
docs/2.x
,docs/3.x
and directly underdocs/
. If eg a guide is requested for Piwik 2, we first look for docs indocs/2.x
and if not found for docs indocs/
. This allows us to have some pages always the same, egsupport
page etc. So far I have left all guides underdocs/
as not many docs will actually change for Piwik 3. This way, when changing a document underdocs/
it will be updated for Piwik 2 and 3.As soon as something on a guide changes for Piwik 3, we should copy that article into
docs/2.x
and afterwards make adjustments on the content for Piwik 3. As soon as we release Piwik 4 it gets a bit more complicated but we can think about it when this actually happens. We would under circumstances need to copy the article intodocs/2.x
anddocs/3.x
as soon as we need to change an article for Piwik 4 (or we implement some logic that checks for different Piwik directories but that wouldn't be as good likely and not important for now). I think we just need to see how it goes and change behaviour if needed. I have also explained this inREADME.md
.The main problem are links to other pages and menu items. Say an article links to a class in Piwik 3 but this class doesn't exist in Piwik 2, then the guide that is the same under Piwik 2 and 3 is broken and we would not to put that guide into the
docs/2.x
page and adjust the link there. It can get quite complicated to notice and to decide when an article needs to be copied intodocs/2.x
folder. We could therefore also copy pretty much all pages intodocs/2.x
this way they would be always the same and we wouldn't need to care about anything when changing it (apart from pages like "Support", "Piwik Core Development", ... which should always be the same). This would be the safest way but some pages would not be updated automatically when eg fixing a guide in Piwik 3.Might be better to discuss how to handle it in person and we can change it any time
We also need to find a solution for images used in guides. Some guide link to images from piwik.org such as http://piwik.org/wp-content/uploads/2014/09/action_example.png . We should probably make sure to have all images in this repository and have different versions of it such as
img/2.x/
andimg/3.x/