Merge pull request #1 from status-im/initial-workflow
rough instructioons in the readme on how to work with this workflow
This commit is contained in:
commit
bb47643c93
47
README.md
47
README.md
|
@ -1,2 +1,47 @@
|
|||
# status.im-partials
|
||||
Global parts of the Status web presence which are shared between all sites
|
||||
|
||||
Global parts of the Status web presence which are shared between all sites.
|
||||
|
||||
It is expected that this repo should be included into other status static websites, using gits **submodule feature**.
|
||||
|
||||
### Adding this repo to an existing/new status static website.
|
||||
|
||||
First, `cd` down into the partials folder of the theme in use (since the command to add a submodule adds it relative to where the command is running).
|
||||
|
||||
Next we can run this command: `git submodule add https://github.com/status-im/status.im-partials shared-partials`
|
||||
What this does is add the repo as a submodule, effectively cloning it, in this case into a folder '**shared-partials**'.
|
||||
|
||||
Done! Now other partials in that project can reference (with relative paths - at least until hexo version 4) the partials contained in the newly created **shared-partials** folder.
|
||||
This would be done usuing hexos partial syntax:
|
||||
```
|
||||
{{ partial('partial/shared-partials/partials/footer') }}
|
||||
```
|
||||
|
||||
### Working-on/editing the partials in this repo
|
||||
|
||||
First you edit the files and push them up into the repo, then you'll need to update the other static websites which include this repo as a submodule.
|
||||
|
||||
#### 1. Editing the files
|
||||
|
||||
The partials can be edited by either cloning this repo as it is and pushing it up as per any normal git workflow
|
||||
OR
|
||||
even better you can just work on them within whatever other repo you have added this one to as a submodule. This makes testing as you go possible and is the recommended workflow.
|
||||
|
||||
In that case cd down into the correct place (following on from the above example: the *shared-partials* folder), and git away as usual.
|
||||
Note: git submodule repos are added with detached heads by default, so first run `git checkout master` (from within the submodule repo) before commiting :)
|
||||
|
||||
#### 2. Updating other sites that makes use of these shared partials
|
||||
|
||||
From the root of each other website, run the command `git submodule update --recursive --remote`. It will pull down any changes to the submodule repo.
|
||||
|
||||
Note: That will update all and any submodules within the document tree.
|
||||
|
||||
It is expected that other static sites add the above command as an .npm script (eg. "update-submodules") to make things simpler & also aid integrating with CI/CD.
|
||||
|
||||
### Assumptions
|
||||
|
||||
These shared partials were developed to be used in *hexo* projects.
|
||||
|
||||
### Notes
|
||||
|
||||
We went with submodules over subtrees, so that we could 'clone' this repo into specific folders, that way the contained partials could be referenced relatively.
|
|
@ -0,0 +1,45 @@
|
|||
{# shared - edit once, and update in other static sites #}
|
||||
<div class="footer footer--global">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-table">
|
||||
<div class="footer-table__column">
|
||||
<p class="footer-header">Social links</p>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link footer-link--fb"><a href="https://www.facebook.com/ethstatus" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Facebook</span></a></li>
|
||||
<li class="footer-link footer-link--tw"><a href="https://twitter.com/ethstatus" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Twitter</span></a></li>
|
||||
<li class="footer-link footer-link--ri"><a href="https://chat.status.im/#/register" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Riot</span></a></li>
|
||||
<li class="footer-link footer-link--gh"><a href="https://github.com/status-im" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Github</span></a></li>
|
||||
<li class="footer-link footer-link--rd"><a href="https://www.reddit.com/r/statusim/" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">Reddit</span></a></li>
|
||||
<li class="footer-link footer-link--yt"><a href="https://www.youtube.com/statusim" target="_blank"><span class="footer-icon"></span><span class="footer-link-label">YouTube</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer-table__column">
|
||||
<p class="footer-header">More</p>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link"><a href="/docs/" target="_blank">Status Docs</a></li>
|
||||
<li class="footer-link"><a href="https://our.status.im/" target="_blank">Status Blog</a></li>
|
||||
<li class="footer-link"><a href="/contribute/" target="_blank">Jobs</a></li>
|
||||
<li class="footer-link"><a href="/privacy-policy.html" target="_blank">Privacy Policy</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer-table__column">
|
||||
<p class="footer-header">Projects</p>
|
||||
<ul class="footer-list">
|
||||
<li class="footer-link"><a href="https://embark.status.im" target="_blank">Embark</a></li>
|
||||
<li class="footer-link"><a href="https://incubate.status.im/" target="_blank">Incubate</a></li>
|
||||
<li class="footer-link"><a href="https://nimbus.status.im/" target="_blank">Nimbus</a></li>
|
||||
<li class="footer-link"><a href="https://studio.status.im/" target="_blank">Studio</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-logo-wrap">
|
||||
<div class="footer-logo-wrap__inner">
|
||||
<a class="footer-logo" href="https://status.im" target="_blank"></a>
|
||||
<div class="footer-address secondary-text">Status Research & Development GmbH<br/>Baarerstrasse 10<br/>Zug, Switzerland</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,10 @@
|
|||
{# shared - edit once, and update in other static sites #}
|
||||
<ul class="main-nav">
|
||||
<li class="item--to-show"><a href="/get/" class="">App</a></li>
|
||||
<li class="item--to-show"> <a href="https://our.status.im/">Blog</a> </li>
|
||||
<li class="item--to-show"> <a href="/docs/">Docs</a></li>
|
||||
<li class="item--dropdown item--dropdown-projects"> <a href="#" class="">Projects</a></li>
|
||||
<li><a href="/contribute/" id="contribute">Contribute today</a></li>
|
||||
<li class="item--dropdown"><a href="#" class="item--dropdown-community">Community</a></li>
|
||||
<li class="item--more"><a href="#" class="item--more">More</a></li>
|
||||
</ul>
|
Loading…
Reference in New Issue