Skip to content
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

GitHub integration warning? #74

Open
nakednous opened this issue Oct 11, 2020 · 6 comments
Open

GitHub integration warning? #74

nakednous opened this issue Oct 11, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@nakednous
Copy link

nakednous commented Oct 11, 2020

Created a test repo codedoc having master as its default branch and configure gh-pages to the gh-pages branch. After which running:

# local system is archlinux
$codedoc init

populates config.ts as:

// config.ts
import { configuration } from '@codedoc/core';

import { theme } from './theme';


export const config = /*#__PURE__*/configuration({
  theme,                                  // --> add the theme. modify `./theme.ts` for chaning the theme.
  
  page: {
    title: {
      base: 'Codedoc'                     // --> the base title of your doc pages
    }
  },
  
});
$codedoc check # No issues detected

Since my repo is in github (and gh-pages are already configured) I thought config.ts should have produced the github literal. Did I miss something? So I manually added the github integration as:

// config.ts
import { configuration } from '@codedoc/core';

import { theme } from './theme';


export const config = /*#__PURE__*/configuration({
  theme,                                  // --> add the theme. modify `./theme.ts` for chaning the theme.
  
  page: {
    title: {
      base: 'Codedoc'                     // --> the base title of your doc pages
    }
  },

  dest: {
    html: 'dist',
    assets: 'dist',
    namespace: '/codedoc'
  },

  misc: {
    github: {
      user: 'nakednous',
      repo: 'codedoc',
      action: 'Star',
      count: false,
      large: true,
      standardIcon: false,
    }
  },  
  
});

However, running codedoc check produces the following warning:

$codedoc check


# Checking GitHub configuration ...
#
# WARNING:: 
# Your CODEDOC config indicates GitHub integration, but
# your project folder is not in sync with a GitHub repository.
#
# You can fix this by modifying .codedoc/config.ts
#
# Read https://codedoc.cc/docs/config/misc#github-integration for more information.
#

Is it an issue or is it just my config?

@TysonMN
Copy link
Contributor

TysonMN commented Oct 11, 2020

At what URL do you want your site served?

@nakednous
Copy link
Author

nakednous commented Oct 11, 2020

https://nakednous.github.io/codedoc

I added the github yml to the actual repo and it worked as expected. I was wondering about the warning I'm getting.

@loreanvictor
Copy link
Contributor

@nakednous may I ask:

  • how did you clone your repo locally (i.e. via https or via ssh)?
  • which version of codedoc cli are you using? you can find that out by running codedoc v

@nakednous
Copy link
Author

I used https. Have no keys configured, but try to clone with gh repo clone and the warning message has gone.

# @codedoc/cli version 0.2.6 ...................................... latest: 0.2.6
# @codedoc/core version: 0.2.15 

@loreanvictor
Copy link
Contributor

So I just tried to replicate the issue doing the following:

git clone https://github.com/nakednous/codedoc.git     # --> cloning via https
cd codedoc                                             # --> going to the cloned folder
codedoc install                                        # --> install codedoc dependencies
codedoc check

And I get no warnings. Can you run this command in the cloned folder where you get the warning and reply the result?

git remote get-url origin

@nakednous
Copy link
Author

I get:https://github.com/nakednous/codedoc

@loreanvictor loreanvictor added the bug Something isn't working label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants