diff options
author | nodiscc <nodiscc@gmail.com> | 2017-01-26 18:52:54 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2017-06-18 00:19:49 +0200 |
commit | 53ed6d7d1e678d7486337ce67a2f17b30bac21ac (patch) | |
tree | f8bef0164a70bd03d2b9781951c01bdd018f1842 /doc/Upgrade-and-migration.html | |
parent | d5d22a6d07917865c44148ad76f43c65a929a890 (diff) | |
download | Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.gz Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.zst Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.zip |
Generate HTML documentation using MkDocs (WIP)
MkDocs is a static site generator geared towards building project documentation.
Documentation source files are written in Markdown, and configured with a single YAML file.
* http://www.mkdocs.org/
* http://www.mkdocs.org/user-guide/configuration/
Ref. #312
* remove pandoc-generated HTML documentation
* move markdown doc to doc/md/,
* mkdocs.yml:
* generate HTML doc in doc/html
* add pages TOC/ordering
* use index.md as index page
* Makefile: remove execute permissions from generated files
* Makefile: rewrite htmlpages GFM to markdown conversion using sed:
awk expression aslo matched '][' which causes invalid output on complex links with images or code blocks
* Add mkdocs.yml to .gitattributes, exclude this file from release archives
* Makefile: rename: htmldoc -> doc_html target
* run make doc: pull latest markdown documentation from wiki
* run make htmlpages: update html documentation
Diffstat (limited to 'doc/Upgrade-and-migration.html')
-rw-r--r-- | doc/Upgrade-and-migration.html | 259 |
1 files changed, 0 insertions, 259 deletions
diff --git a/doc/Upgrade-and-migration.html b/doc/Upgrade-and-migration.html deleted file mode 100644 index 667215ab..00000000 --- a/doc/Upgrade-and-migration.html +++ /dev/null | |||
@@ -1,259 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset="utf-8"> | ||
5 | <meta name="generator" content="pandoc"> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | ||
7 | <title>Shaarli – Upgrade and migration</title> | ||
8 | <style type="text/css">code{white-space: pre;}</style> | ||
9 | <style type="text/css"> | ||
10 | div.sourceCode { overflow-x: auto; } | ||
11 | table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { | ||
12 | margin: 0; padding: 0; vertical-align: baseline; border: none; } | ||
13 | table.sourceCode { width: 100%; line-height: 100%; } | ||
14 | td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } | ||
15 | td.sourceCode { padding-left: 5px; } | ||
16 | code > span.kw { color: #007020; font-weight: bold; } /* Keyword */ | ||
17 | code > span.dt { color: #902000; } /* DataType */ | ||
18 | code > span.dv { color: #40a070; } /* DecVal */ | ||
19 | code > span.bn { color: #40a070; } /* BaseN */ | ||
20 | code > span.fl { color: #40a070; } /* Float */ | ||
21 | code > span.ch { color: #4070a0; } /* Char */ | ||
22 | code > span.st { color: #4070a0; } /* String */ | ||
23 | code > span.co { color: #60a0b0; font-style: italic; } /* Comment */ | ||
24 | code > span.ot { color: #007020; } /* Other */ | ||
25 | code > span.al { color: #ff0000; font-weight: bold; } /* Alert */ | ||
26 | code > span.fu { color: #06287e; } /* Function */ | ||
27 | code > span.er { color: #ff0000; font-weight: bold; } /* Error */ | ||
28 | code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ | ||
29 | code > span.cn { color: #880000; } /* Constant */ | ||
30 | code > span.sc { color: #4070a0; } /* SpecialChar */ | ||
31 | code > span.vs { color: #4070a0; } /* VerbatimString */ | ||
32 | code > span.ss { color: #bb6688; } /* SpecialString */ | ||
33 | code > span.im { } /* Import */ | ||
34 | code > span.va { color: #19177c; } /* Variable */ | ||
35 | code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ | ||
36 | code > span.op { color: #666666; } /* Operator */ | ||
37 | code > span.bu { } /* BuiltIn */ | ||
38 | code > span.ex { } /* Extension */ | ||
39 | code > span.pp { color: #bc7a00; } /* Preprocessor */ | ||
40 | code > span.at { color: #7d9029; } /* Attribute */ | ||
41 | code > span.do { color: #ba2121; font-style: italic; } /* Documentation */ | ||
42 | code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ | ||
43 | code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ | ||
44 | code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ | ||
45 | </style> | ||
46 | <link rel="stylesheet" href="github-markdown.css"> | ||
47 | <!--[if lt IE 9]> | ||
48 | <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> | ||
49 | <![endif]--> | ||
50 | </head> | ||
51 | <body> | ||
52 | <div id="local-sidebar"> | ||
53 | <ul> | ||
54 | <li><a href="Home.html">Home</a></li> | ||
55 | <li>Setup | ||
56 | <ul> | ||
57 | <li><a href="Download-and-Installation.html">Download and Installation</a></li> | ||
58 | <li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li> | ||
59 | <li><a href="Server-requirements.html">Server requirements</a></li> | ||
60 | <li><a href="Server-configuration.html">Server configuration</a></li> | ||
61 | <li><a href="Server-security.html">Server security</a></li> | ||
62 | <li><a href="Shaarli-configuration.html">Shaarli configuration</a></li> | ||
63 | <li><a href="Plugins.html">Plugins</a></li> | ||
64 | </ul></li> | ||
65 | <li><a href="Docker.html">Docker</a></li> | ||
66 | <li><a href="Usage.html">Usage</a> | ||
67 | <ul> | ||
68 | <li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li> | ||
69 | <li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li> | ||
70 | <li><a href="Firefox-share.html">Firefox share</a></li> | ||
71 | <li><a href="RSS-feeds.html">RSS feeds</a></li> | ||
72 | <li><a href="REST-API.html">REST API</a></li> | ||
73 | </ul></li> | ||
74 | <li>How To | ||
75 | <ul> | ||
76 | <li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li> | ||
77 | <li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li> | ||
78 | <li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li> | ||
79 | <li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li> | ||
80 | <li><a href="Datastore-hacks.html">Datastore hacks</a></li> | ||
81 | </ul></li> | ||
82 | <li><a href="Troubleshooting.html">Troubleshooting</a></li> | ||
83 | <li><a href="Development.html">Development</a> | ||
84 | <ul> | ||
85 | <li><a href="GnuPG-signature.html">GnuPG signature</a></li> | ||
86 | <li><a href="Coding-guidelines.html">Coding guidelines</a></li> | ||
87 | <li><a href="Directory-structure.html">Directory structure</a></li> | ||
88 | <li><a href="3rd-party-libraries.html">3rd party libraries</a></li> | ||
89 | <li><a href="Plugin-System.html">Plugin System</a></li> | ||
90 | <li><a href="Release-Shaarli.html">Release Shaarli</a></li> | ||
91 | <li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li> | ||
92 | <li><a href="Security.html">Security</a></li> | ||
93 | <li><a href="Static-analysis.html">Static analysis</a></li> | ||
94 | <li><a href="Theming.html">Theming</a></li> | ||
95 | <li><a href="Unit-tests.html">Unit tests</a></li> | ||
96 | </ul></li> | ||
97 | <li>About | ||
98 | <ul> | ||
99 | <li><a href="FAQ.html">FAQ</a></li> | ||
100 | <li><a href="Community-&-Related-software.html">Community & Related software</a></li> | ||
101 | </ul></li> | ||
102 | </ul> | ||
103 | </div> | ||
104 | <h1 id="upgrade-and-migration">Upgrade and migration</h1> | ||
105 | <h2 id="preparation">Preparation</h2> | ||
106 | <h3 id="note-your-current-version">Note your current version</h3> | ||
107 | <p>If anything goes wrong, it's important for us to know which version you're upgrading from.<br /> | ||
108 | The current version is present in the <code>version.php</code> file.</p> | ||
109 | <h3 id="backup-your-data">Backup your data</h3> | ||
110 | <p>Shaarli stores all user data under the <code>data</code> directory:</p> | ||
111 | <ul> | ||
112 | <li><code>data/config.php</code> - main configuration file</li> | ||
113 | <li><code>data/datastore.php</code> - bookmarked links</li> | ||
114 | <li><code>data/ipbans.php</code> - banned IP addresses</li> | ||
115 | <li><code>data/updates.txt</code> - contains all automatic update to the configuration and datastore files already run</li> | ||
116 | </ul> | ||
117 | <p>See <a href="Shaarli-configuration.html">Shaarli configuration</a> for more information about Shaarli resources.</p> | ||
118 | <p>It is recommended to backup this repository <em>before</em> starting updating/upgrading Shaarli:</p> | ||
119 | <ul> | ||
120 | <li>users with SSH access: copy or archive the directory to a temporary location</li> | ||
121 | <li>users with FTP access: download a local copy of your Shaarli installation using your favourite client</li> | ||
122 | </ul> | ||
123 | <h3 id="migrating-data-from-a-previous-installation">Migrating data from a previous installation</h3> | ||
124 | <p>As all user data is kept under <code>data</code>, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:</p> | ||
125 | <ul> | ||
126 | <li>backup the <code>data</code> directory</li> | ||
127 | <li>install or update Shaarli: | ||
128 | <ul> | ||
129 | <li>fresh installation - see <a href="Download-and-installation.html">Download and installation</a></li> | ||
130 | <li>update - see the following sections</li> | ||
131 | </ul></li> | ||
132 | <li>check or restore the <code>data</code> directory</li> | ||
133 | </ul> | ||
134 | <h2 id="recommended-upgrading-from-release-archives">Recommended : Upgrading from release archives</h2> | ||
135 | <p>All tagged revisions can be downloaded as tarballs or ZIP archives from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p> | ||
136 | <p>We recommend that you use the latest release tarball with the <code>-full</code> suffix. It contains the dependencies, please read <a href="Download-and-installation.html">Download and installation</a> for <code>git</code> complete instructions.</p> | ||
137 | <p>Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the <code>data</code> directory!</p> | ||
138 | <p>After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to <code>data/config.json.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p> | ||
139 | <h2 id="upgrading-with-git">Upgrading with Git</h2> | ||
140 | <h3 id="updating-a-community-shaarli">Updating a community Shaarli</h3> | ||
141 | <p>If you have installed Shaarli from the <a href="Download#clone-with-git-recommended">community Git repository</a>, simply <a href="https://www.git-scm.com/docs/git-pull">pull new changes</a> from your local clone:<a href=".html"></a></p> | ||
142 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli | ||
143 | $ <span class="fu">git</span> pull | ||
144 | |||
145 | <span class="ex">From</span> github.com:shaarli/Shaarli | ||
146 | <span class="ex">*</span> branch master -<span class="op">></span> FETCH_HEAD | ||
147 | <span class="ex">Updating</span> ebd67c6..521f0e6 | ||
148 | <span class="ex">Fast-forward</span> | ||
149 | <span class="ex">application/Url.php</span> <span class="kw">|</span> <span class="ex">1</span> + | ||
150 | <span class="ex">shaarli_version.php</span> <span class="kw">|</span> <span class="ex">2</span> +- | ||
151 | <span class="ex">tests/Url/UrlTest.php</span> <span class="kw">|</span> <span class="ex">1</span> + | ||
152 | <span class="ex">3</span> files changed, 3 insertions(+), <span class="ex">1</span> deletion(-)</code></pre></div> | ||
153 | <p>Shaarli >= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p> | ||
154 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> install --no-dev | ||
155 | |||
156 | <span class="ex">Loading</span> composer repositories with package information | ||
157 | <span class="ex">Updating</span> dependencies | ||
158 | <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1) | ||
159 | <span class="ex">Downloading</span>: 100%</code></pre></div> | ||
160 | <h3 id="migrating-and-upgrading-from-sebsauvages-repository">Migrating and upgrading from Sebsauvage's repository</h3> | ||
161 | <p>If you have installed Shaarli from <a href="https://github.com/sebsauvage/Shaarli">Sebsauvage's original Git repository</a>, you can use <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">Git remotes</a> to update your working copy.<a href=".html"></a></p> | ||
162 | <p>The following guide assumes that:</p> | ||
163 | <ul> | ||
164 | <li>you have a basic knowledge of Git <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell">branching</a> and <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">remote repositories</a><a href=".html"></a></li> | ||
165 | <li>the default remote is named <code>origin</code> and points to Sebsauvage's repository</li> | ||
166 | <li>the current branch is <code>master</code> | ||
167 | <ul> | ||
168 | <li>if you have personal branches containing customizations, you will need to <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">rebase them</a> after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break<embed src=".html" /></li> | ||
169 | </ul></li> | ||
170 | <li>the working copy is clean: | ||
171 | <ul> | ||
172 | <li>no versioned file has been locally modified</li> | ||
173 | <li>no untracked files are present</li> | ||
174 | </ul></li> | ||
175 | </ul> | ||
176 | <h4 id="step-0-show-repository-information">Step 0: show repository information</h4> | ||
177 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli | ||
178 | |||
179 | $ <span class="fu">git</span> remote -v | ||
180 | <span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (fetch) | ||
181 | <span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (push) | ||
182 | |||
183 | $ <span class="fu">git</span> branch -vv | ||
184 | <span class="ex">*</span> master 029f75f [origin/master] Update README.md[](.html) | ||
185 | |||
186 | $ <span class="fu">git</span> status | ||
187 | <span class="ex">On</span> branch master | ||
188 | <span class="ex">Your</span> branch is up-to-date with <span class="st">'origin/master'</span>. | ||
189 | <span class="ex">nothing</span> to commit, working directory clean</code></pre></div> | ||
190 | <h4 id="step-1-update-git-remotes">Step 1: update Git remotes</h4> | ||
191 | <pre><code>$ git remote rename origin sebsauvage | ||
192 | $ git remote -v | ||
193 | sebsauvage https://github.com/sebsauvage/Shaarli (fetch) | ||
194 | sebsauvage https://github.com/sebsauvage/Shaarli (push) | ||
195 | |||
196 | $ git remote add origin https://github.com/shaarli/Shaarli | ||
197 | $ git fetch origin | ||
198 | |||
199 | remote: Counting objects: 3015, done. | ||
200 | remote: Compressing objects: 100% (19/19), done. | ||
201 | remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550 | ||
202 | Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. | ||
203 | Resolving deltas: 100% (1899/1899), completed with 48 local objects. | ||
204 | From https://github.com/shaarli/Shaarli | ||
205 | * [new branch] master -> origin/master[](.html) | ||
206 | * [new branch] stable -> origin/stable[](.html) | ||
207 | [...][](.html) | ||
208 | * [new tag] v0.6.4 -> v0.6.4[](.html) | ||
209 | * [new tag] v0.7.0 -> v0.7.0[](.html)</code></pre> | ||
210 | <h4 id="step-2-use-the-stable-community-branch">Step 2: use the stable community branch</h4> | ||
211 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> checkout origin/stable -b stable | ||
212 | <span class="ex">Branch</span> stable set up to track remote branch stable from origin. | ||
213 | <span class="ex">Switched</span> to a new branch <span class="st">'stable'</span> | ||
214 | |||
215 | $ <span class="fu">git</span> branch -vv | ||
216 | <span class="ex">master</span> 029f75f [sebsauvage/master] Update README.md[](.html) | ||
217 | <span class="ex">*</span> stable 890afc3 [origin/stable] Merge pull request <span class="co">#509 from ArthurHoaro/v0.6.5[](.html)</span></code></pre></div> | ||
218 | <p>Shaarli >= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p> | ||
219 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> install --no-dev | ||
220 | |||
221 | <span class="ex">Loading</span> composer repositories with package information | ||
222 | <span class="ex">Updating</span> dependencies | ||
223 | <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1) | ||
224 | <span class="ex">Downloading</span>: 100%</code></pre></div> | ||
225 | <p>Optionally, you can delete information related to the legacy version:</p> | ||
226 | <div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> branch -D master | ||
227 | <span class="ex">Deleted</span> branch master (was 029f75f)<span class="ex">.</span> | ||
228 | |||
229 | $ <span class="fu">git</span> remote remove sebsauvage | ||
230 | |||
231 | $ <span class="fu">git</span> remote -v | ||
232 | <span class="ex">origin</span> https://github.com/shaarli/Shaarli (fetch) | ||
233 | <span class="ex">origin</span> https://github.com/shaarli/Shaarli (push) | ||
234 | |||
235 | $ <span class="fu">git</span> gc | ||
236 | <span class="ex">Counting</span> objects: 3317, done. | ||
237 | <span class="ex">Delta</span> compression using up to 8 threads. | ||
238 | <span class="ex">Compressing</span> objects: 100% (1237/1237), <span class="kw">done</span><span class="ex">.</span> | ||
239 | <span class="ex">Writing</span> objects: 100% (3317/3317), <span class="kw">done</span><span class="ex">.</span> | ||
240 | <span class="ex">Total</span> 3317 (delta 2050), <span class="ex">reused</span> 3301 (delta 2034)<span class="ex">to</span></code></pre></div> | ||
241 | <h4 id="step-3-configuration">Step 3: configuration</h4> | ||
242 | <p>After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to <code>data/config.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p> | ||
243 | <h2 id="troubleshooting">Troubleshooting</h2> | ||
244 | <p>If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.</p> | ||
245 | <h3 id="you-must-specify-an-integer-as-a-key">You must specify an integer as a key</h3> | ||
246 | <p>In <code>v0.8.1</code> we changed how link keys are handled (from timestamps to incremental integers).<br /> | ||
247 | Take a look at <code>data/updates.txt</code> content.</p> | ||
248 | <h4 id="updates.txt-contains-updatemethoddatastoreids"><code>updates.txt</code> contains <code>updateMethodDatastoreIds</code></h4> | ||
249 | <p>Try to delete it and refresh your page while being logged in.</p> | ||
250 | <h4 id="updates.txt-doesnt-exists-or-doesnt-contain-updatemethoddatastoreids"><code>updates.txt</code> doesn't exists or doesn't contain <code>updateMethodDatastoreIds</code></h4> | ||
251 | <ol> | ||
252 | <li>Create <code>data/updates.txt</code> if it doesn't exist.</li> | ||
253 | <li>Paste this string in the update file <code>;updateMethodRenameDashTags;</code></li> | ||
254 | <li>Login to Shaarli.</li> | ||
255 | <li>Delete the update file.</li> | ||
256 | <li>Refresh.</li> | ||
257 | </ol> | ||
258 | </body> | ||
259 | </html> | ||