This is the default theme of Oneshop's Website Sales Channel. Powered by The Oneshop API, website with this theme allows visitors to read content and shop, admins/merchant can manage the shop with ease by using The Oneshop Center.
The design of os-theme is highly modulized and easy to maintain by yourself, this repository will keep update.
Please check regulary to make sure you don't miss any updates in the future especially you have cloned/forked this to your GitHub account😁
If you are good with the default settings and the theme style with the os-theme, you can simply update the settings in The Oneshop Center.
- Clone/Fork the project as your own repository.
- Edit package.json file, replace the value of
proxy
fromhttps://starter.oneshop.host/
to your shop's domain - In terminal, cd into your project and type
npm start
to start your development.
- Edit src/config.js to alter theme's settings.
- Edit Json files in src/helpers/locales for theme multilingualism.
- Login to Oneshop Center
- Click on your shop and click
Themes
at the top menu - Follow the instruction to setup your theme
- Edit the repo URL to your repo url.
- Specify the branch of the theme will use
- The path of the build folder (For ReactJS, the path is /build typically)
- Bear in mind that run
yarn build
ornpm build
before you commit when you want changes you made reveals on the site immediately.
Sometimes you may want to make some changes such as content or links for your theme.
You can modify how the theme interpret the rules to define a attirbute value by editing /src/helper/AttributesHelper.js
But that's not that convenient change it onthe coding level espically if you are a developer and you are developing a website for your customer,
updating those settings inside the Oneshop Center is the best way for your customer.
- Login to Oneshop Center
- Click on your shop and click the ⚙ icon at the top menu
- Scroll down and navigate to the "Custom attributes" section
- Input attribute name and the value for customize partial of the theme
By default, there are two parts can be customize by setting corresponding attributes.
- Social Media icons in footer
Social media attribute names:
facebook
,youtube
,twitter
,instagram
,pinterest
E.g Setfacebook
be the attribute name and your Facebook fan page link to the attribute value. Facebook icon with the link will be displayed in the footer. - Nav bar titles
To customer the text of
Home
,Blog
andshop
set attribute name tonav_home
,nav_blog
,nav_shop
respectively
and the value to this formatzh_hk:YOUR_TEXT_IN_CHINESE|en_us:YOUR_TEXT_IN_ENGLISH
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.